700
How can I filter the check-boxes (method 1)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Check")));
	EXGRIDLib::IEditorPtr var_Editor = var_Column->GetEditor();
		var_Editor->PutEditType(EXGRIDLib::CheckValueType);
		var_Editor->PutOption(EXGRIDLib::exCheckValue2,long(1));
	var_Column->PutDisplayFilterButton(VARIANT_TRUE);
	var_Column->PutDisplayFilterPattern(VARIANT_FALSE);
	var_Column->PutFilterType(EXGRIDLib::exCheck);
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->AddItem(VARIANT_TRUE);
	var_Items->AddItem(VARIANT_TRUE);
	var_Items->AddItem(VARIANT_FALSE);
	var_Items->AddItem(VARIANT_TRUE);
	var_Items->AddItem(VARIANT_FALSE);
	var_Items->AddItem(VARIANT_TRUE);
	var_Items->AddItem(VARIANT_FALSE);

699
How can add a button to control

// ButtonClick event - Occurs when user clicks on the cell's button.
void OnButtonClickGrid1(long   Item,long   ColIndex,VARIANT   Key)
{
	OutputDebugStringW( L"ButtonClick" );
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'
		#import <ExGrid.dll>
		using namespace EXGRIDLib;
	*/
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	OutputDebugStringW( spGrid1->GetItems()->GetCellCaption(Item,ColIndex) );
	OutputDebugStringW( L"Key" );
}

EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutDefaultItemHeight(22);
spGrid1->PutHeaderHeight(22);
spGrid1->PutAppearance(EXGRIDLib::None2);
spGrid1->PutDrawGridLines(EXGRIDLib::exRowLines);
spGrid1->PutScrollBySingleLine(VARIANT_FALSE);
spGrid1->Images(_bstr_t("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq") +
"lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" +
"0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" +
"NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=");
spGrid1->PutHTMLPicture(L"pic1","c:\\exontrol\\images\\auction.gif");
EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns();
	EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Type")));
		var_Column->PutWidth(48);
		var_Column->PutDef(EXGRIDLib::exCellValueFormat,long(1));
	EXGRIDLib::IColumnPtr var_Column1 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Appearance")));
		var_Column1->PutDef(EXGRIDLib::exCellValueFormat,long(1));
		var_Column1->PutAlignment(EXGRIDLib::CenterAlignment);
		var_Column1->PutHeaderAlignment(EXGRIDLib::CenterAlignment);
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("Items.<b>CellHasButton</b> property");
	var_Items->PutCellValue(h,long(1),"Button <b>1</b>");
	var_Items->PutCellHasButton(h,long(1),VARIANT_TRUE);
	h = var_Items->AddItem("Items.<b>CellButtonAutoWidth</b> property");
	var_Items->PutCellValue(h,long(1)," Button <b>2</b> ");
	var_Items->PutCellHasButton(h,long(1),VARIANT_TRUE);
	var_Items->PutCellButtonAutoWidth(h,long(1),VARIANT_TRUE);
	h = var_Items->AddItem("Items.<b>CellHasButton</b> property");
	var_Items->PutCellValue(h,long(1)," <img>2</img>Button <b>3</b> ");
	var_Items->PutCellHasButton(h,long(1),VARIANT_TRUE);
	var_Items->PutCellButtonAutoWidth(h,long(1),VARIANT_TRUE);
	h = var_Items->AddItem("Items.<b>CellHasButton</b> property");
	var_Items->PutItemHeight(h,32);
	var_Items->PutCellValue(h,long(1)," <img>2</img>Button <b>4</b> <img>pic1</img> ");
	var_Items->PutCellHasButton(h,long(1),VARIANT_TRUE);
	var_Items->PutCellButtonAutoWidth(h,long(1),VARIANT_TRUE);
	h = var_Items->AddItem("Items.<b>CellHasButton</b> in splitted cells");
	var_Items->PutCellValue(h,long(1)," Button <b>5.1</b> ");
	var_Items->PutCellHasButton(h,long(1),VARIANT_TRUE);
	var_Items->PutCellButtonAutoWidth(h,long(1),VARIANT_TRUE);
	_variant_t s = var_Items->GetSplitCell(h,long(1));
	var_Items->PutCellValue(long(0),s," Button <b>5.2</b> ");
	var_Items->PutCellHasButton(long(0),s,VARIANT_TRUE);
	var_Items->PutCellButtonAutoWidth(long(0),s,VARIANT_TRUE);
	h = var_Items->AddItem("Column.<b>Editor</b>, Items.<b>CellEditor</b>");
	var_Items->PutCellValue(h,long(1),"Visible when clicking the cell");
	EXGRIDLib::IEditorPtr var_Editor = var_Items->GetCellEditor(h,long(1));
		var_Editor->PutEditType(EXGRIDLib::EditType);
		var_Editor->AddButton("B1",long(1),long(0),"This is a bit of text that's shown when the cursor hovers the button B1",vtMissing,vtMissing);
		var_Editor->AddButton("B3",long(2),long(1),"This is a bit of text that's shown when the cursor hovers the button B3",vtMissing,vtMissing);
		var_Editor->AddButton("B4",long(1),long(1),"This is a bit of text that's shown when the cursor hovers the button B4",vtMissing,vtMissing);
		var_Editor->PutButtonWidth(24);
	h = var_Items->AddItem("Column.<b>Editor</b>, Items.<b>CellEditor</b>");
	var_Items->PutCellValue(h,long(1),long(3));
	EXGRIDLib::IEditorPtr var_Editor1 = var_Items->GetCellEditor(h,long(1));
		var_Editor1->PutEditType(EXGRIDLib::CheckListType);
		var_Editor1->AddItem(1,L"Flag 1",vtMissing);
		var_Editor1->AddItem(2,L"Flag 2",vtMissing);
		var_Editor1->AddItem(4,L"Flag 4",vtMissing);
		var_Editor1->AddItem(8,L"Flag 8",vtMissing);
		var_Editor1->AddButton("C1",long(1),long(0),"This is a bit of text that's shown when the cursor hovers the button C1",vtMissing,vtMissing);
		var_Editor1->AddButton("C3",long(2),long(0),"This is a bit of text that's shown when the cursor hovers the button C2",vtMissing,vtMissing);
		var_Editor1->AddButton("C4",long(1),long(0),"This is a bit of text that's shown when the cursor hovers the button C3",vtMissing,vtMissing);
		var_Editor1->PutButtonWidth(24);
spGrid1->EndUpdate();

698
The item is not getting selected when clicking the cell's checkbox. What should I do

// CellStateChanged event - Fired after cell's state has been changed.
void OnCellStateChangedGrid1(long   Item,long   ColIndex)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'
		#import <ExGrid.dll>
		using namespace EXGRIDLib;
	*/
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	spGrid1->GetItems()->PutSelectItem(Item,VARIANT_TRUE);
}

EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Check")))->PutDef(EXGRIDLib::exCellHasCheckBox,VARIANT_TRUE);
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->AddItem(long(0));
	var_Items->AddItem(long(1));
	var_Items->AddItem(long(2));
	var_Items->AddItem(long(3));

697
Is it possible to limit the height of the item while resizing

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void OnAddItemGrid1(long   Item)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'
		#import <ExGrid.dll>
		using namespace EXGRIDLib;
	*/
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	spGrid1->GetItems()->PutItemMinHeight(Item,18);
	spGrid1->GetItems()->PutItemMaxHeight(Item,72);
}

EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutItemsAllowSizing(EXGRIDLib::exResizeItem);
spGrid1->PutScrollBySingleLine(VARIANT_FALSE);
spGrid1->PutBackColorAlternate(RGB(240,240,240));
spGrid1->GetColumns()->Add(L"Names");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->AddItem("Mantel");
	var_Items->AddItem("Mechanik");
	var_Items->AddItem("Motor");
	var_Items->AddItem("Murks");
	var_Items->AddItem("Märchen");
	var_Items->AddItem("Möhren");
	var_Items->AddItem("Mühle");
spGrid1->GetColumns()->GetItem(long(0))->PutSortOrder(EXGRIDLib::SortAscending);
spGrid1->EndUpdate();

696
Is it possible to copy the hierarchy of the control using the GetItems method

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot);
spGrid1->GetColumns()->Add(L"Def");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("Root");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
spGrid1->PutItems(spGrid1->GetItems(long(-1)),vtMissing);

695
Is it possible to auto-numbering the children items but still keeps the position after filtering

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot);
EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Items")));
	var_Column->PutDisplayFilterButton(VARIANT_TRUE);
	var_Column->PutFilterType(EXGRIDLib::exFilter);
	var_Column->PutFilter(L"Child 2");
EXGRIDLib::IColumnPtr var_Column1 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Pos.1")));
	var_Column1->PutFormatColumn(L"1 ropos ''");
	var_Column1->PutPosition(0);
	var_Column1->PutWidth(32);
	var_Column1->PutAllowSizing(VARIANT_FALSE);
EXGRIDLib::IColumnPtr var_Column2 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Pos.2")));
	var_Column2->PutFormatColumn(L"1 ropos ':'");
	var_Column2->PutPosition(1);
	var_Column2->PutWidth(32);
	var_Column2->PutAllowSizing(VARIANT_FALSE);
EXGRIDLib::IColumnPtr var_Column3 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Pos.3")));
	var_Column3->PutFormatColumn(L"1 ropos ':|A-Z'");
	var_Column3->PutPosition(2);
	var_Column3->PutWidth(32);
	var_Column3->PutAllowSizing(VARIANT_FALSE);
EXGRIDLib::IColumnPtr var_Column4 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Pos.4")));
	var_Column4->PutFormatColumn(L"1 ropos '|A-Z|'");
	var_Column4->PutPosition(3);
	var_Column4->PutWidth(32);
	var_Column4->PutAllowSizing(VARIANT_FALSE);
EXGRIDLib::IColumnPtr var_Column5 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Pos.5")));
	var_Column5->PutFormatColumn(L"'<font Tahoma;7>' + 1 ropos '-<b>||A-Z'");
	var_Column5->PutDef(EXGRIDLib::exCellValueFormat,long(1));
	var_Column5->PutPosition(4);
	var_Column5->PutWidth(32);
	var_Column5->PutAllowSizing(VARIANT_FALSE);
EXGRIDLib::IColumnPtr var_Column6 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Pos.6")));
	var_Column6->PutFormatColumn(L"'<b>'+ 1 ropos '</b>:<fgcolor=FF0000>|A-Z|'");
	var_Column6->PutDef(EXGRIDLib::exCellValueFormat,long(1));
	var_Column6->PutPosition(5);
	var_Column6->PutWidth(48);
	var_Column6->PutAllowSizing(VARIANT_FALSE);
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("Root 1");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	h = var_Items->AddItem("Root 2");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
spGrid1->ApplyFilter();
spGrid1->EndUpdate();

694
Is it possible to auto-numbering the children items too

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot);
spGrid1->GetColumns()->Add(L"Items");
EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Pos.1")));
	var_Column->PutFormatColumn(L"1 rpos ''");
	var_Column->PutPosition(0);
	var_Column->PutWidth(32);
	var_Column->PutAllowSizing(VARIANT_FALSE);
EXGRIDLib::IColumnPtr var_Column1 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Pos.2")));
	var_Column1->PutFormatColumn(L"1 rpos ':'");
	var_Column1->PutPosition(1);
	var_Column1->PutWidth(32);
	var_Column1->PutAllowSizing(VARIANT_FALSE);
EXGRIDLib::IColumnPtr var_Column2 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Pos.3")));
	var_Column2->PutFormatColumn(L"1 rpos ':|A-Z'");
	var_Column2->PutPosition(2);
	var_Column2->PutWidth(32);
	var_Column2->PutAllowSizing(VARIANT_FALSE);
EXGRIDLib::IColumnPtr var_Column3 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Pos.4")));
	var_Column3->PutFormatColumn(L"1 rpos '|A-Z|'");
	var_Column3->PutPosition(3);
	var_Column3->PutWidth(32);
	var_Column3->PutAllowSizing(VARIANT_FALSE);
EXGRIDLib::IColumnPtr var_Column4 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Pos.5")));
	var_Column4->PutFormatColumn(L"'<font Tahoma;7>' + 1 rpos '-<b>||A-Z'");
	var_Column4->PutDef(EXGRIDLib::exCellValueFormat,long(1));
	var_Column4->PutPosition(4);
	var_Column4->PutWidth(32);
	var_Column4->PutAllowSizing(VARIANT_FALSE);
EXGRIDLib::IColumnPtr var_Column5 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Pos.6")));
	var_Column5->PutFormatColumn(L"'<b>'+ 1 rpos '</b>:<fgcolor=FF0000>|A-Z|'");
	var_Column5->PutDef(EXGRIDLib::exCellValueFormat,long(1));
	var_Column5->PutPosition(5);
	var_Column5->PutWidth(48);
	var_Column5->PutAllowSizing(VARIANT_FALSE);
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("Root 1");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	h = var_Items->AddItem("Root 2");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
spGrid1->EndUpdate();

693
Is it possible to cancel or discard the values during validation

// ValidateValue event - Occurs before user changes the cell's value.
void OnValidateValueGrid1(long   Item,long   ColIndex,VARIANT   NewValue,BOOL FAR*   Cancel)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'
		#import <ExGrid.dll>
		using namespace EXGRIDLib;
	*/
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	OutputDebugStringW( L"ValidateValue" );
	OutputDebugStringW( L"NewValue" );
	OutputDebugStringW( L"Change the Cancel parameter for ValidateValue event to accept/decline the newly value. " );
	OutputDebugStringW( L"The DiscardValidateValue restores back the previously values." );
	spGrid1->DiscardValidateValue();
}

EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutCauseValidateValue(EXGRIDLib::exValidateCell);
((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Date")))->GetEditor()->PutEditType(EXGRIDLib::DateType);
((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Text")))->GetEditor()->PutEditType(EXGRIDLib::EditType);
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->PutCellValue(var_Items->AddItem(COleDateTime(2001,1,1,0,00,00).operator DATE()),long(1),"text");
	var_Items->PutCellValue(var_Items->AddItem(COleDateTime(2001,1,1,0,00,00).operator DATE()),long(1),"text");
	var_Items->PutCellValue(var_Items->AddItem(COleDateTime(2001,1,1,0,00,00).operator DATE()),long(1),"text");
	var_Items->PutCellValue(var_Items->AddItem(COleDateTime(2001,1,1,0,00,00).operator DATE()),long(1),"text");
	var_Items->PutCellValue(var_Items->AddItem(COleDateTime(2001,1,1,0,00,00).operator DATE()),long(1),"text");
spGrid1->EndUpdate();

692
Is it possible to validate the values of the cells only when user leaves the focused item
// ValidateValue event - Occurs before user changes the cell's value.
void OnValidateValueGrid1(long   Item,long   ColIndex,VARIANT   NewValue,BOOL FAR*   Cancel)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'
		#import <ExGrid.dll>
		using namespace EXGRIDLib;
	*/
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	OutputDebugStringW( L"ValidateValue" );
	OutputDebugStringW( L"NewValue" );
	OutputDebugStringW( L"Change the Cancel parameter for ValidateValue event to accept/decline the newly value. " );
	Cancel = VARIANT_TRUE;
	OutputDebugStringW( L"You can not leave the item/record until the Cancel is False." );
}

EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutCauseValidateValue(EXGRIDLib::exValidateItem);
((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Date")))->GetEditor()->PutEditType(EXGRIDLib::DateType);
((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Text")))->GetEditor()->PutEditType(EXGRIDLib::EditType);
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->PutCellValue(var_Items->AddItem(COleDateTime(2001,1,1,0,00,00).operator DATE()),long(1),"text");
	var_Items->PutCellValue(var_Items->AddItem(COleDateTime(2001,1,1,0,00,00).operator DATE()),long(1),"text");
	var_Items->PutCellValue(var_Items->AddItem(COleDateTime(2001,1,1,0,00,00).operator DATE()),long(1),"text");
	var_Items->PutCellValue(var_Items->AddItem(COleDateTime(2001,1,1,0,00,00).operator DATE()),long(1),"text");
	var_Items->PutCellValue(var_Items->AddItem(COleDateTime(2001,1,1,0,00,00).operator DATE()),long(1),"text");
spGrid1->EndUpdate();

691
We would like to validate the values of the cells. Is it possible

// ValidateValue event - Occurs before user changes the cell's value.
void OnValidateValueGrid1(long   Item,long   ColIndex,VARIANT   NewValue,BOOL FAR*   Cancel)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'
		#import <ExGrid.dll>
		using namespace EXGRIDLib;
	*/
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	OutputDebugStringW( L"ValidateValue" );
	OutputDebugStringW( L"NewValue" );
	OutputDebugStringW( L"Change the Cancel parameter for ValidateValue event to accept/decline the newly value." );
	Cancel = VARIANT_TRUE;
	OutputDebugStringW( L"You can not leave the cell until the Cancel is False." );
}

EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutCauseValidateValue(EXGRIDLib::exValidateCell);
((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Date")))->GetEditor()->PutEditType(EXGRIDLib::DateType);
((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Text")))->GetEditor()->PutEditType(EXGRIDLib::EditType);
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->PutCellValue(var_Items->AddItem(COleDateTime(2001,1,1,0,00,00).operator DATE()),long(1),"text");
	var_Items->PutCellValue(var_Items->AddItem(COleDateTime(2001,1,1,0,00,00).operator DATE()),long(1),"text");
	var_Items->PutCellValue(var_Items->AddItem(COleDateTime(2001,1,1,0,00,00).operator DATE()),long(1),"text");
	var_Items->PutCellValue(var_Items->AddItem(COleDateTime(2001,1,1,0,00,00).operator DATE()),long(1),"text");
	var_Items->PutCellValue(var_Items->AddItem(COleDateTime(2001,1,1,0,00,00).operator DATE()),long(1),"text");
spGrid1->EndUpdate();

690
Is there any way to add auto-numbering

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns();
	var_Columns->Add(L"Items");
	EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Pos")));
		var_Column->PutFormatColumn(L"1 pos ''");
		var_Column->PutPosition(0);
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->AddItem("Item 1");
	var_Items->AddItem("Item 2");
	var_Items->AddItem("Item 3");

689
Does your control supports multiple lines tooltip

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->PutHTMLPicture(L"pic1","c:\\exontrol\\images\\zipdisk.gif");
spGrid1->PutToolTipDelay(1);
((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"tootip")))->PutToolTip(_bstr_t("<br><font Tahoma;10>This</font> is a <b>multi-lines</b> tooltip assigned to a column. The tooltip supports built-in HTML tags, ") +
"icons and pictures.<br><br><br><img>pic1</img> picture ... <br><br>");

688
How can I prevent highlighting the column from the cursor - point

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->GetVisualAppearance()->Add(1,_bstr_t("gBFLBCJwBAEHhEJAEGg4BI0IQAAYAQGKIYBkAKBQAGaAoDDUOQzQwAAxDKKUEwsACEIrjKCYVgOHYYRrIMYgBCMJhLEoaZLhEZRQiqDYtRDFQBSDDcPw/EaRZohGaYJ") +
"gEgI=");
spGrid1->PutBackground(EXGRIDLib::exCursorHoverColumn,0x1000000);
((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"S")))->PutWidth(32);
((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Level 1")))->PutLevelKey(long(1));
((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Level 2")))->PutLevelKey(long(1));
((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Level 3")))->PutLevelKey(long(1));
((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"E1")))->PutWidth(32);
((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"E2")))->PutWidth(32);
((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"E3")))->PutWidth(32);
((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"E4")))->PutWidth(32);

687
Is it possible display numbers in the same format no matter of regional settings in the control panel

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Def")))->PutDef(EXGRIDLib::exCellValueFormat,long(1));
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem(double(100000.27));
	var_Items->PutFormatCell(h,long(0),L"(value format '') +  ' <fgcolor=808080>(default positive)'");
	h = var_Items->AddItem(double(100000.27));
	var_Items->PutFormatCell(h,long(0),L"(value format '2|.|3|,|1|1')");
	h = var_Items->AddItem(double(-100000.27));
	var_Items->PutFormatCell(h,long(0),L"(value format '') +  ' <fgcolor=808080>(default negative)'");
	h = var_Items->AddItem(double(-100000.27));
	var_Items->PutFormatCell(h,long(0),L"(value format '2|.|3|,|1|1')");
spGrid1->EndUpdate();

686
Is it possible to add a 0 for numbers less than 1 instead .7 to show 0.8

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Def")))->PutDef(EXGRIDLib::exCellValueFormat,long(1));
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem(double(0.27));
	var_Items->PutFormatCell(h,long(0),L"(value format '') +  ' <fgcolor=808080>(default)'");
	h = var_Items->AddItem(double(0.27));
	var_Items->PutFormatCell(h,long(0),L"(value format '|||||0') +  ' <fgcolor=808080>(Display no leading zeros)'");
spGrid1->EndUpdate();

685
How can I specify the format for negative numbers

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Def")))->PutDef(EXGRIDLib::exCellValueFormat,long(1));
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem(double(-100000.27));
	var_Items->PutFormatCell(h,long(0),L"(value format '') +  ' <fgcolor=808080>(default)'");
	h = var_Items->AddItem(double(-100000.27));
	var_Items->PutFormatCell(h,long(0),L"(value format '||||1') +  ' <fgcolor=808080>(Negative sign, number; for example, -1.1)'");
spGrid1->EndUpdate();

684
Is it possible to change the grouping character when display numbers

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Def")))->PutDef(EXGRIDLib::exCellValueFormat,long(1));
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem(double(100000.27));
	var_Items->PutFormatCell(h,long(0),L"(value format '') +  ' <fgcolor=808080>(default)'");
	h = var_Items->AddItem(double(100000.27));
	var_Items->PutFormatCell(h,long(0),L"(value format '|||-') +  ' <fgcolor=808080>(grouping character is -)'");
spGrid1->EndUpdate();

683
How can I display numbers with 2 digits in each group

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Def")))->PutDef(EXGRIDLib::exCellValueFormat,long(1));
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem(double(100000.27));
	var_Items->PutFormatCell(h,long(0),L"(value format '') +  ' <fgcolor=808080>(default)'");
	h = var_Items->AddItem(double(100000.27));
	var_Items->PutFormatCell(h,long(0),L"(value format '||2') +  ' <fgcolor=808080>(grouping by 2 digits)'");
spGrid1->EndUpdate();

682
How can I display my numbers using a different decimal separator

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Def")))->PutDef(EXGRIDLib::exCellValueFormat,long(1));
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem(double(100.27));
	var_Items->PutFormatCell(h,long(0),L"(value format '') +  ' <fgcolor=808080>(default)'");
	h = var_Items->AddItem(double(100.27));
	var_Items->PutFormatCell(h,long(0),L"(value format '|;') +  ' <fgcolor=808080>(decimal separator is <b>;</b>)'");
spGrid1->EndUpdate();

681
Is it possible to display the numbers using 3 (three) digits

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Def")))->PutDef(EXGRIDLib::exCellValueFormat,long(1));
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem(double(100.27));
	var_Items->PutFormatCell(h,long(0),L"(value format '') +  ' <fgcolor=808080>(default)'");
	h = var_Items->AddItem(double(100.27));
	var_Items->PutFormatCell(h,long(0),L"(value format '3') +  ' <fgcolor=808080>(3 digits)'");
	h = var_Items->AddItem(double(100.27));
	var_Items->PutFormatCell(h,long(0),L"(value format 2) +  '  <fgcolor=808080>(2 digits)'");
	h = var_Items->AddItem(double(100.27));
	var_Items->PutFormatCell(h,long(0),L"(value format 1) +  ' <fgcolor=808080>(1 digit)'");
spGrid1->EndUpdate();

680
Is there any option to show the tooltip programmatically

// MouseMove event - Occurs when the user moves the mouse.
void OnMouseMoveGrid1(short   Button,short   Shift,long   X,long   Y)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'
		#import <ExGrid.dll>
		using namespace EXGRIDLib;
	*/
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	spGrid1->ShowToolTip(_bstr_t(spGrid1->GetItemFromPoint(-1,-1,c,hit)),"","8","8",vtMissing);
}

EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->GetColumns()->Add(L"Def");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->AddItem("Item 1");
	var_Items->AddItem("Item 2");
	var_Items->AddItem("Item 3");
spGrid1->EndUpdate();

679
How can I specify the column's width to be the same for all columns

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns();
	var_Columns->Add(L"A");
	var_Columns->Add(L"B");
	var_Columns->Add(L"C");
spGrid1->PutDrawGridLines(EXGRIDLib::exAllLines);
spGrid1->PutColumnAutoResize(VARIANT_TRUE);

678
How can I set the column's width to my desired width

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->PutColumnAutoResize(VARIANT_FALSE);
EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns();
	((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"A")))->PutWidth(128);
	((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"B")))->PutWidth(128);
spGrid1->PutDrawGridLines(EXGRIDLib::exAllLines);

677
Is it possible to format numbers

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutMarkSearchColumn(VARIANT_FALSE);
EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns();
	var_Columns->Add(L"Name");
	EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"A")));
		var_Column->PutSortType(EXGRIDLib::SortNumeric);
		var_Column->PutAllowSizing(VARIANT_FALSE);
		var_Column->PutWidth(36);
		var_Column->PutFormatColumn(L"len(value) ? value + ' +'");
		var_Column->GetEditor()->PutEditType(EXGRIDLib::SpinType);
	EXGRIDLib::IColumnPtr var_Column1 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"B")));
		var_Column1->PutSortType(EXGRIDLib::SortNumeric);
		var_Column1->PutAllowSizing(VARIANT_FALSE);
		var_Column1->PutWidth(36);
		var_Column1->PutFormatColumn(L"len(value) ? value + ' +'");
		var_Column1->GetEditor()->PutEditType(EXGRIDLib::SpinType);
	EXGRIDLib::IColumnPtr var_Column2 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"C")));
		var_Column2->PutSortType(EXGRIDLib::SortNumeric);
		var_Column2->PutAllowSizing(VARIANT_FALSE);
		var_Column2->PutWidth(36);
		var_Column2->PutFormatColumn(L"len(value) ? value + ' ='");
		var_Column2->GetEditor()->PutEditType(EXGRIDLib::SpinType);
	EXGRIDLib::IColumnPtr var_Column3 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"A+B+C")));
		var_Column3->PutSortType(EXGRIDLib::SortNumeric);
		var_Column3->PutWidth(64);
		var_Column3->PutComputedField(L"dbl(%1)+dbl(%2)+dbl(%3)");
		var_Column3->PutFormatColumn(_bstr_t("type(value) in (0,1) ? 'null' : ( dbl(value)<0 ? '<fgcolor=FF0000>'+ (value format '2|.|3|,|1' ) : (dbl(value)>0 ? '<fgcolor=00") +
"00FF>+'+(value format '2|.|3|,' ): '0.00') )");
		var_Column3->PutDef(EXGRIDLib::exCellValueFormat,long(1));
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("Root");
	var_Items->PutCellValueFormat(h,long(4),EXGRIDLib::exComputedField);
	long h1 = var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->PutCellValue(h1,long(1),long(7));
	var_Items->PutCellValue(h1,long(2),long(3));
	var_Items->PutCellValue(h1,long(3),long(1));
	h1 = var_Items->InsertItem(h,vtMissing,"Child 2");
	var_Items->PutCellValue(h1,long(1),long(-2));
	var_Items->PutCellValue(h1,long(2),long(-2));
	var_Items->PutCellValue(h1,long(3),long(-4));
	h1 = var_Items->InsertItem(h,vtMissing,"Child 3");
	var_Items->PutCellValue(h1,long(1),long(2));
	var_Items->PutCellValue(h1,long(2),long(2));
	var_Items->PutCellValue(h1,long(3),long(-4));
	var_Items->PutExpandItem(h,VARIANT_TRUE);
spGrid1->EndUpdate();

676
How can I collapse all items

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot);
spGrid1->GetColumns()->Add(L"Items");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("Root 1");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
	h = var_Items->AddItem("Root 2");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
	var_Items->PutExpandItem(0,VARIANT_FALSE);
spGrid1->EndUpdate();

675
How can I expand all items

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot);
spGrid1->GetColumns()->Add(L"Items");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("Root 1");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
	h = var_Items->AddItem("Root 2");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
	var_Items->PutExpandItem(0,VARIANT_TRUE);
spGrid1->EndUpdate();

674
Can I display a total field without having to add a child item

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Numbers")));
	var_Column->PutSortType(EXGRIDLib::SortNumeric);
	EXGRIDLib::IEditorPtr var_Editor = var_Column->GetEditor();
		var_Editor->PutEditType(EXGRIDLib::SpinType);
		var_Editor->PutNumeric(EXGRIDLib::exFloat);
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->AddItem(long(1));
	var_Items->AddItem(long(2));
	var_Items->AddItem(long(3));
	var_Items->AddItem(long(4));
	var_Items->PutLockedItemCount(EXGRIDLib::exBottom,1);
	long h = var_Items->GetLockedItem(EXGRIDLib::exBottom,0);
	var_Items->PutCellValue(h,long(0),"sum(all,dir,dbl(%0))");
	var_Items->PutSortableItem(h,VARIANT_FALSE);
	var_Items->PutCellValueFormat(h,long(0),EXGRIDLib::exTotalField);
	var_Items->PutCellHAlignment(h,long(0),EXGRIDLib::RightAlignment);
	var_Items->PutFormatCell(h,long(0),L"'SUM: '+value");
spGrid1->EndUpdate();

673
Can I display the number of child items

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutLinesAtRoot(EXGRIDLib::exGroupLinesAtRoot);
spGrid1->GetColumns()->Add(L"");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("Root 1");
	_variant_t hx = var_Items->GetSplitCell(h,long(0));
	var_Items->PutCellValue(long(0),hx,"count(current,dir,1)");
	var_Items->PutCellValueFormat(long(0),hx,EXGRIDLib::exTotalField);
	var_Items->PutFormatCell(long(0),hx,L"'Childs: ' + value");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	h = var_Items->AddItem("Root 2");
	hx = var_Items->GetSplitCell(h,long(0));
	var_Items->PutCellValue(long(0),hx,"count(current,dir,1)");
	var_Items->PutCellValueFormat(long(0),hx,EXGRIDLib::exTotalField);
	var_Items->PutFormatCell(long(0),hx,L"'Childs: ' + value");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
	var_Items->InsertItem(h,vtMissing,"Child 3");
	var_Items->InsertItem(h,vtMissing,"Child 4");
spGrid1->EndUpdate();

672
My field does not display the correctly computed value if I enter data using the control's editors ( concatenation of strings ). What am I doing wrong

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->GetColumns()->Add(L"T");
EXGRIDLib::IEditorPtr var_Editor = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"A")))->GetEditor();
	var_Editor->PutNumeric(EXGRIDLib::exInteger);
	var_Editor->PutEditType(EXGRIDLib::SpinType);
EXGRIDLib::IEditorPtr var_Editor1 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"B")))->GetEditor();
	var_Editor1->PutNumeric(EXGRIDLib::exInteger);
	var_Editor1->PutEditType(EXGRIDLib::SpinType);
spGrid1->GetColumns()->Add(L"A+B");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("Incorrect");
	var_Items->PutCellToolTip(h,long(0),L"Just type a number in the column A or B. The result will be concaternated");
	var_Items->PutCellValue(h,long(1),"10");
	var_Items->PutCellValue(h,long(2),"20");
	var_Items->PutCellValue(h,long(3),"currency(%1+%2)");
	var_Items->PutCellValueFormat(h,long(3),EXGRIDLib::exComputedField);
	h = var_Items->AddItem("Correct");
	var_Items->PutCellValue(h,long(1),long(10));
	var_Items->PutCellValue(h,long(2),long(20));
	var_Items->PutCellValue(h,long(3),"currency(dbl(%1)+dbl(%2))");
	var_Items->PutCellValueFormat(h,long(3),EXGRIDLib::exComputedField);
spGrid1->EndUpdate();

671
The CellValue/CellCaption property gets the result of a computed/total field with text formatting. Is it possible to get that value without text formatting

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"A")))->GetEditor()->PutEditType(EXGRIDLib::SpinType);
((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"B")))->GetEditor()->PutEditType(EXGRIDLib::SpinType);
spGrid1->GetColumns()->Add(L"A+B");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem(long(10));
	var_Items->PutCellValue(h,long(1),long(20));
	var_Items->PutCellValueFormat(h,long(2),EXGRIDLib::exComputedField);
	var_Items->PutCellValue(h,long(2),"currency(dbl(%0)+dbl(%1))");
	OutputDebugStringW( L"CellCaption returns " );
	OutputDebugStringW( var_Items->GetCellCaption(h,long(2)) );
	OutputDebugStringW( L"CellValue returns " );
	OutputDebugStringW( _bstr_t(var_Items->GetCellValue(h,long(2))) );
	OutputDebugStringW( L"ComputeValue returns " );
	OutputDebugStringW( _bstr_t(var_Items->GetComputeValue("dbl(%0)+dbl(%1)",h,long(0),var_Items->GetCellValueFormat(h,long(2)))) );
spGrid1->EndUpdate();

670
Can I get the result of a specified formula as your control does using the ComputedField property
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->GetColumns()->Add(L"A");
spGrid1->GetColumns()->Add(L"B");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem(long(10));
	var_Items->PutCellValue(h,long(1),long(20));
	OutputDebugStringW( L"A+B is " );
	OutputDebugStringW( _bstr_t(var_Items->GetComputeValue("dbl(%0)+dbl(%1)",h,long(0),long(2))) );
spGrid1->EndUpdate();

669
Is it possible to get the text without HTML formatting

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->GetColumns()->Add(L"");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("<b>bold</b>");
	OutputDebugStringW( _bstr_t(var_Items->GetComputeValue(var_Items->GetCellValue(h,long(0)),h,long(0),long(1))) );
spGrid1->EndUpdate();

668
Can I specify an item to be a separator

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutTreeColumnIndex(-1);
spGrid1->PutSortOnClick(EXGRIDLib::exNoSort);
spGrid1->GetColumns()->Add(L"Numbers");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->AddItem(long(1));
	var_Items->AddItem(long(2));
	long h = var_Items->AddItem("separator");
	var_Items->PutSelectableItem(h,VARIANT_FALSE);
	var_Items->PutItemDivider(h,0);
	var_Items->PutItemDividerLineAlignment(h,EXGRIDLib::DividerCenter);
	var_Items->PutItemDividerLine(h,EXGRIDLib::ThinLine);
	var_Items->PutCellHAlignment(h,long(0),EXGRIDLib::CenterAlignment);
	var_Items->AddItem(long(3));
	var_Items->AddItem(long(4));
spGrid1->EndUpdate();

667
How can I count only non-zero values

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Numbers")))->PutSortType(EXGRIDLib::SortNumeric);
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->AddItem(long(1));
	var_Items->AddItem(long(2));
	var_Items->AddItem(long(0));
	var_Items->AddItem(long(0));
	var_Items->AddItem(long(0));
	var_Items->AddItem(long(0));
	var_Items->AddItem(long(3));
	var_Items->AddItem(long(4));
	long h = var_Items->AddItem("sum(all,dir,dbl(%0)?1:0)");
	var_Items->PutSortableItem(h,VARIANT_FALSE);
	var_Items->PutCellValueFormat(h,long(0),EXGRIDLib::exTotalField);
	var_Items->PutCellHAlignment(h,long(0),EXGRIDLib::RightAlignment);
	var_Items->PutFormatCell(h,long(0),L"'COUNT non-zero: '+value");
spGrid1->EndUpdate();

666
How can I add a AVG ( average ) field

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Numbers")))->PutSortType(EXGRIDLib::SortNumeric);
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->AddItem(long(1));
	var_Items->AddItem(long(2));
	var_Items->AddItem(long(3));
	var_Items->AddItem(long(4));
	long h = var_Items->AddItem("avg(all,dir,dbl(%0))");
	var_Items->PutSortableItem(h,VARIANT_FALSE);
	var_Items->PutCellValueFormat(h,long(0),EXGRIDLib::exTotalField);
	var_Items->PutCellHAlignment(h,long(0),EXGRIDLib::RightAlignment);
	var_Items->PutFormatCell(h,long(0),L"'AVG: '+value");
spGrid1->EndUpdate();

665
How can I add a COUNT field

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Numbers")))->PutSortType(EXGRIDLib::SortNumeric);
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->AddItem(long(1));
	var_Items->AddItem(long(2));
	var_Items->AddItem(long(3));
	var_Items->AddItem(long(4));
	long h = var_Items->AddItem("count(all,dir,0)");
	var_Items->PutSortableItem(h,VARIANT_FALSE);
	var_Items->PutCellValueFormat(h,long(0),EXGRIDLib::exTotalField);
	var_Items->PutCellHAlignment(h,long(0),EXGRIDLib::RightAlignment);
	var_Items->PutFormatCell(h,long(0),L"'COUNT: '+value");
spGrid1->EndUpdate();

664
How can I add a MAX field

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Numbers")))->PutSortType(EXGRIDLib::SortNumeric);
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->AddItem(long(1));
	var_Items->AddItem(long(2));
	var_Items->AddItem(long(3));
	var_Items->AddItem(long(4));
	long h = var_Items->AddItem("max(all,dir,dbl(%0))");
	var_Items->PutSortableItem(h,VARIANT_FALSE);
	var_Items->PutCellValueFormat(h,long(0),EXGRIDLib::exTotalField);
	var_Items->PutCellHAlignment(h,long(0),EXGRIDLib::RightAlignment);
	var_Items->PutFormatCell(h,long(0),L"'MAX: '+value");
spGrid1->EndUpdate();

663
How can I add a MIN or MAX field (for numbers)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Numbers")))->PutSortType(EXGRIDLib::SortNumeric);
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->AddItem(long(11));
	var_Items->AddItem(long(21));
	var_Items->AddItem(long(3));
	var_Items->AddItem(long(4));
	long h = var_Items->AddItem("min(all,dir,dbl(%0))");
	var_Items->PutSortableItem(h,VARIANT_FALSE);
	var_Items->PutCellValueFormat(h,long(0),EXGRIDLib::exTotalField);
	var_Items->PutCellHAlignment(h,long(0),EXGRIDLib::RightAlignment);
	var_Items->PutFormatCell(h,long(0),L"'MIN: '+value");
	h = var_Items->AddItem("max(all,dir,dbl(%0))");
	var_Items->PutSortableItem(h,VARIANT_FALSE);
	var_Items->PutCellValueFormat(h,long(0),EXGRIDLib::exTotalField);
	var_Items->PutCellHAlignment(h,long(0),EXGRIDLib::RightAlignment);
	var_Items->PutFormatCell(h,long(0),L"'MAX: '+value");
spGrid1->EndUpdate();

662
How can I add a SUM field

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Numbers")))->PutSortType(EXGRIDLib::SortNumeric);
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->AddItem(long(1));
	var_Items->AddItem(long(2));
	var_Items->AddItem(long(3));
	var_Items->AddItem(long(4));
	long h = var_Items->AddItem("sum(all,dir,dbl(%0))");
	var_Items->PutSortableItem(h,VARIANT_FALSE);
	var_Items->PutCellValueFormat(h,long(0),EXGRIDLib::exTotalField);
	var_Items->PutCellHAlignment(h,long(0),EXGRIDLib::RightAlignment);
	var_Items->PutFormatCell(h,long(0),L"'SUM: '+value");
spGrid1->EndUpdate();

661
How can I add total and subtotals fields

// Change event - Occurs when the user changes the cell's content.
void OnChangeGrid1(long   Item,long   ColIndex,VARIANT FAR*   NewValue)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'
		#import <ExGrid.dll>
		using namespace EXGRIDLib;
	*/
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	spGrid1->Refresh();
}

EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutLinesAtRoot(EXGRIDLib::exGroupLinesAtRoot);
spGrid1->GetColumns()->Add(L"Members");
EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Values")));
	var_Column->PutFormatColumn(L"currency(value)");
	EXGRIDLib::IEditorPtr var_Editor = var_Column->GetEditor();
		var_Editor->PutEditType(EXGRIDLib::SpinType);
		var_Editor->PutNumeric(EXGRIDLib::exInteger);
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("Group 1");
	var_Items->PutItemBold(h,VARIANT_TRUE);
	var_Items->PutCellEditorVisible(h,long(1),EXGRIDLib::exEditorHidden);
	var_Items->PutCellValue(h,long(1),"sum(current,dir,dbl(%1))");
	var_Items->PutCellValueFormat(h,long(1),EXGRIDLib::ValueFormatEnum(EXGRIDLib::exTotalField | EXGRIDLib::exHTML));
	var_Items->PutCellHAlignment(h,long(1),EXGRIDLib::RightAlignment);
	var_Items->PutCellValue(var_Items->InsertItem(h,vtMissing,"Child 1"),long(1),long(10));
	var_Items->PutCellValue(var_Items->InsertItem(h,vtMissing,"Child 2"),long(1),long(20));
	var_Items->PutCellValue(var_Items->InsertItem(h,vtMissing,"Child 3"),long(1),long(30));
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	h = var_Items->AddItem("Group 2");
	var_Items->PutItemBold(h,VARIANT_TRUE);
	var_Items->PutCellEditorVisible(h,long(1),EXGRIDLib::exEditorHidden);
	var_Items->PutCellValue(h,long(1),"sum(current,dir,dbl(%1))");
	var_Items->PutCellValueFormat(h,long(1),EXGRIDLib::ValueFormatEnum(EXGRIDLib::exTotalField | EXGRIDLib::exHTML));
	var_Items->PutCellHAlignment(h,long(1),EXGRIDLib::RightAlignment);
	var_Items->PutCellValue(var_Items->InsertItem(h,vtMissing,"Child 1"),long(1),long(5));
	var_Items->PutCellValue(var_Items->InsertItem(h,vtMissing,"Child 2"),long(1),long(15));
	var_Items->PutCellValue(var_Items->InsertItem(h,vtMissing,"Child 3"),long(1),long(35));
	h = var_Items->AddItem("total");
	var_Items->PutCellValue(h,long(1),"sum(all,rec,dbl(%1))");
	var_Items->PutCellValueFormat(h,long(1),EXGRIDLib::ValueFormatEnum(EXGRIDLib::exTotalField | EXGRIDLib::exHTML));
	var_Items->PutCellEditorVisible(h,long(1),EXGRIDLib::exEditorHidden);
	var_Items->PutFormatCell(h,long(1),L"'Total: <b>' + currency(value)");
	var_Items->PutCellHAlignment(h,long(1),EXGRIDLib::RightAlignment);
	var_Items->PutItemDivider(h,1);
	var_Items->PutItemDividerLineAlignment(h,EXGRIDLib::DividerCenter);
	var_Items->PutItemDividerLine(h,EXGRIDLib::DoubleLine);
	var_Items->PutSortableItem(h,VARIANT_FALSE);
spGrid1->EndUpdate();

660
Is is possible to have subtotal items, and a grand total item

// Change event - Occurs when the user changes the cell's content.
void OnChangeGrid1(long   Item,long   ColIndex,VARIANT FAR*   NewValue)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'
		#import <ExGrid.dll>
		using namespace EXGRIDLib;
	*/
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	spGrid1->Refresh();
}

EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutBackColor(RGB(255,255,255));
spGrid1->PutLinesAtRoot(EXGRIDLib::exGroupLinesAtRoot);
spGrid1->PutShowFocusRect(VARIANT_FALSE);
spGrid1->GetColumns()->Add(L"Members");
EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Values")));
	var_Column->PutFormatColumn(L"currency(value)");
	EXGRIDLib::IEditorPtr var_Editor = var_Column->GetEditor();
		var_Editor->PutEditType(EXGRIDLib::SpinType);
		var_Editor->PutNumeric(EXGRIDLib::exInteger);
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("Group 1");
	var_Items->PutItemBold(h,VARIANT_TRUE);
	var_Items->PutSortableItem(h,VARIANT_FALSE);
	var_Items->PutCellEditorVisible(h,long(1),EXGRIDLib::exEditorHidden);
	var_Items->PutFormatCell(h,long(1),L" ");
	var_Items->PutCellValue(var_Items->InsertItem(h,vtMissing,"Child 1"),long(1),long(10));
	var_Items->PutCellValue(var_Items->InsertItem(h,vtMissing,"Child 2"),long(1),long(20));
	var_Items->PutCellValue(var_Items->InsertItem(h,vtMissing,"Child 3"),long(1),long(30));
	long hT = var_Items->InsertItem(h,vtMissing,"subtotal");
	var_Items->PutCellHAlignment(hT,long(1),EXGRIDLib::RightAlignment);
	var_Items->PutCellEditorVisible(hT,long(1),EXGRIDLib::exEditorHidden);
	var_Items->PutCellValue(hT,long(1),"sum(parent,dir,dbl(%1))");
	var_Items->PutCellValueFormat(hT,long(1),EXGRIDLib::ValueFormatEnum(EXGRIDLib::exTotalField | EXGRIDLib::exHTML));
	var_Items->PutFormatCell(hT,long(1),L"'subtotal: <b>' + currency(value)");
	var_Items->PutItemDivider(hT,1);
	var_Items->PutItemDividerLineAlignment(hT,EXGRIDLib::DividerCenter);
	var_Items->PutSortableItem(hT,VARIANT_FALSE);
	var_Items->PutSelectableItem(hT,VARIANT_FALSE);
	var_Items->PutItemDividerLine(hT,EXGRIDLib::DotLine);
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	h = var_Items->AddItem("Group 2");
	var_Items->PutItemBold(h,VARIANT_TRUE);
	var_Items->PutSortableItem(h,VARIANT_FALSE);
	var_Items->PutFormatCell(h,long(1),L" ");
	var_Items->PutCellEditorVisible(h,long(1),EXGRIDLib::exEditorHidden);
	var_Items->PutCellValue(var_Items->InsertItem(h,vtMissing,"Child 1"),long(1),long(15));
	var_Items->PutCellValue(var_Items->InsertItem(h,vtMissing,"Child 2"),long(1),long(25));
	var_Items->PutCellValue(var_Items->InsertItem(h,vtMissing,"Child 3"),long(1),long(18));
	hT = var_Items->InsertItem(h,vtMissing,"subtotal");
	var_Items->PutCellHAlignment(hT,long(1),EXGRIDLib::RightAlignment);
	var_Items->PutCellEditorVisible(hT,long(1),EXGRIDLib::exEditorHidden);
	var_Items->PutCellValue(hT,long(1),"sum(parent,dir,dbl(%1))");
	var_Items->PutCellValueFormat(hT,long(1),EXGRIDLib::ValueFormatEnum(EXGRIDLib::exTotalField | EXGRIDLib::exHTML));
	var_Items->PutFormatCell(hT,long(1),L"'subtotal: <b>' + currency(value)");
	var_Items->PutItemDivider(hT,1);
	var_Items->PutItemDividerLineAlignment(hT,EXGRIDLib::DividerCenter);
	var_Items->PutItemDividerLine(hT,EXGRIDLib::DotLine);
	var_Items->PutSortableItem(hT,VARIANT_FALSE);
	var_Items->PutSelectableItem(hT,VARIANT_FALSE);
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	h = var_Items->AddItem("total");
	var_Items->PutCellValue(h,long(1),"sum(all,rec,dbl(%1))");
	var_Items->PutCellValueFormat(h,long(1),EXGRIDLib::ValueFormatEnum(EXGRIDLib::exTotalField | EXGRIDLib::exHTML));
	var_Items->PutCellEditorVisible(h,long(1),EXGRIDLib::exEditorHidden);
	var_Items->PutFormatCell(h,long(1),L"'Total: <b><font ;11>' + currency(value)");
	var_Items->PutCellHAlignment(h,long(1),EXGRIDLib::CenterAlignment);
	var_Items->PutItemDivider(h,1);
	var_Items->PutItemDividerLineAlignment(h,EXGRIDLib::DividerCenter);
	var_Items->PutItemDividerLine(h,EXGRIDLib::DoubleLine);
	var_Items->PutSortableItem(h,VARIANT_FALSE);
	var_Items->PutSelectableItem(h,VARIANT_FALSE);
spGrid1->EndUpdate();

659
Is it possible to have a total field for each column

// Change event - Occurs when the user changes the cell's content.
void OnChangeGrid1(long   Item,long   ColIndex,VARIANT FAR*   NewValue)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'
		#import <ExGrid.dll>
		using namespace EXGRIDLib;
	*/
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	spGrid1->Refresh();
}

EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"C1")));
	EXGRIDLib::IEditorPtr var_Editor = var_Column->GetEditor();
		var_Editor->PutNumeric(EXGRIDLib::exInteger);
		var_Editor->PutEditType(EXGRIDLib::SpinType);
	var_Column->PutSortType(EXGRIDLib::SortNumeric);
EXGRIDLib::IColumnPtr var_Column1 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"C2")));
	EXGRIDLib::IEditorPtr var_Editor1 = var_Column1->GetEditor();
		var_Editor1->PutNumeric(EXGRIDLib::exInteger);
		var_Editor1->PutEditType(EXGRIDLib::SpinType);
	var_Column1->PutSortType(EXGRIDLib::SortNumeric);
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->PutLockedItemCount(EXGRIDLib::exBottom,1);
	long h = var_Items->GetLockedItem(EXGRIDLib::exBottom,0);
	var_Items->PutItemBackColor(h,RGB(240,240,240));
	var_Items->PutItemBold(h,VARIANT_TRUE);
	var_Items->PutCellValue(h,long(0),"sum(all,dir,dbl(%0))");
	var_Items->PutCellValueFormat(h,long(0),EXGRIDLib::exTotalField);
	var_Items->PutCellValue(h,long(1),"sum(all,dir,dbl(%1))");
	var_Items->PutCellValueFormat(h,long(1),EXGRIDLib::exTotalField);
EXGRIDLib::IItemsPtr var_Items1 = spGrid1->GetItems();
	var_Items1->PutCellValue(var_Items1->AddItem(long(10)),long(1),long(12));
	var_Items1->PutCellValue(var_Items1->AddItem(long(25)),long(1),long(5));
	var_Items1->PutCellValue(var_Items1->AddItem(long(31)),long(1),long(17));
	var_Items1->PutCellValue(var_Items1->AddItem(long(48)),long(1),long(22));
spGrid1->EndUpdate();

658
How can I add a total field for a DataSource being used

// Change event - Occurs when the user changes the cell's content.
void OnChangeGrid1(long   Item,long   ColIndex,VARIANT FAR*   NewValue)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'
		#import <ExGrid.dll>
		using namespace EXGRIDLib;
	*/
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	spGrid1->Refresh();
}

EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->PutColumnAutoResize(VARIANT_FALSE);
spGrid1->PutContinueColumnScroll(VARIANT_FALSE);
/*
	Includes the definition for CreateObject function like follows:

	#include <comdef.h>
	IUnknownPtr CreateObject( BSTR Object )
	{
		IUnknownPtr spResult;
		spResult.CreateInstance( Object );
		return spResult;
	};

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spGrid1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->PutLockedItemCount(EXGRIDLib::exTop,1);
	long h = var_Items->GetLockedItem(EXGRIDLib::exTop,0);
	var_Items->PutItemDivider(h,0);
	var_Items->PutCellValueFormat(h,long(0),EXGRIDLib::ValueFormatEnum(EXGRIDLib::exTotalField | EXGRIDLib::exHTML));
	var_Items->PutCellValue(h,long(0),"sum(all,dir,%1)");

657
How can I add a total field

// Change event - Occurs when the user changes the cell's content.
void OnChangeGrid1(long   Item,long   ColIndex,VARIANT FAR*   NewValue)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'
		#import <ExGrid.dll>
		using namespace EXGRIDLib;
	*/
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	spGrid1->Refresh();
}

EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Numbers")));
	EXGRIDLib::IEditorPtr var_Editor = var_Column->GetEditor();
		var_Editor->PutNumeric(EXGRIDLib::exInteger);
		var_Editor->PutEditType(EXGRIDLib::SpinType);
	var_Column->PutSortType(EXGRIDLib::SortNumeric);
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->PutLockedItemCount(EXGRIDLib::exTop,1);
	long h = var_Items->GetLockedItem(EXGRIDLib::exTop,0);
	var_Items->PutItemBackColor(h,RGB(240,240,240));
	var_Items->PutCellValue(h,long(0),"sum(all,dir,dbl(%0))");
	var_Items->PutCellValueFormat(h,long(0),EXGRIDLib::exTotalField);
	var_Items->PutCellHAlignment(h,long(0),EXGRIDLib::RightAlignment);
	var_Items->PutFormatCell(h,long(0),L"'Total: '+value");
EXGRIDLib::IItemsPtr var_Items1 = spGrid1->GetItems();
	var_Items1->AddItem(long(10));
	var_Items1->AddItem(long(25));
	var_Items1->AddItem(long(31));
	var_Items1->AddItem(long(48));
spGrid1->EndUpdate();

656
How can I add a total field

// Change event - Occurs when the user changes the cell's content.
void OnChangeGrid1(long   Item,long   ColIndex,VARIANT FAR*   NewValue)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'
		#import <ExGrid.dll>
		using namespace EXGRIDLib;
	*/
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	spGrid1->Refresh();
}

EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
EXGRIDLib::IEditorPtr var_Editor = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Items")))->GetEditor();
	var_Editor->PutEditType(EXGRIDLib::SpinType);
	var_Editor->PutNumeric(EXGRIDLib::exInteger);
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("Group 1");
	var_Items->PutCellEditorVisible(h,long(0),EXGRIDLib::exEditorHidden);
	var_Items->InsertItem(h,vtMissing,long(10));
	var_Items->InsertItem(h,vtMissing,long(20));
	var_Items->InsertItem(h,vtMissing,long(30));
	long hT = var_Items->InsertItem(h,vtMissing,"sum(parent,dir,dbl(%0))");
	var_Items->PutCellEditorVisible(hT,long(0),EXGRIDLib::exEditorHidden);
	var_Items->PutCellValueFormat(hT,long(0),EXGRIDLib::ValueFormatEnum(EXGRIDLib::exTotalField | EXGRIDLib::exHTML));
	var_Items->PutItemDivider(hT,0);
	var_Items->PutItemDividerLineAlignment(hT,EXGRIDLib::DividerTop);
	var_Items->PutSelectableItem(hT,VARIANT_FALSE);
	var_Items->PutSortableItem(hT,VARIANT_FALSE);
	var_Items->PutExpandItem(h,VARIANT_TRUE);
spGrid1->EndUpdate();

655
Is it possible to specify the cell's value but still want to display some formatted text instead the value

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->GetColumns()->Add(L"Value");
spGrid1->GetColumns()->Add(L"FormatCell");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem(long(1));
	var_Items->PutCellValue(h,long(1),long(12));
	var_Items->PutFormatCell(h,long(1),L"currency(value)");
	h = var_Items->AddItem(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Items->PutCellValue(h,long(1),COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Items->PutCellValueFormat(h,long(1),EXGRIDLib::exHTML);
	var_Items->PutFormatCell(h,long(1),L"longdate(value) replace '2001' with '<b>2001</b>'");
spGrid1->EndUpdate();

654
How can I simulate displaying groups

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->PutHasLines(EXGRIDLib::exNoLine);
spGrid1->PutScrollBySingleLine(VARIANT_TRUE);
EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns();
	var_Columns->Add(L"Name");
	var_Columns->Add(L"A");
	var_Columns->Add(L"B");
	var_Columns->Add(L"C");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("Group 1");
	var_Items->PutCellHAlignment(h,long(0),EXGRIDLib::CenterAlignment);
	var_Items->PutItemDivider(h,0);
	var_Items->PutItemDividerLineAlignment(h,EXGRIDLib::DividerBoth);
	var_Items->PutItemHeight(h,24);
	var_Items->PutSortableItem(h,VARIANT_FALSE);
	long h1 = var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->PutCellValue(h1,long(1),long(1));
	var_Items->PutCellValue(h1,long(2),long(2));
	var_Items->PutCellValue(h1,long(3),long(3));
	h1 = var_Items->InsertItem(h,vtMissing,"Child 2");
	var_Items->PutCellValue(h1,long(1),long(4));
	var_Items->PutCellValue(h1,long(2),long(5));
	var_Items->PutCellValue(h1,long(3),long(6));
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	h = var_Items->AddItem("Group 2");
	var_Items->PutCellHAlignment(h,long(0),EXGRIDLib::CenterAlignment);
	var_Items->PutItemDivider(h,0);
	var_Items->PutItemDividerLineAlignment(h,EXGRIDLib::DividerBoth);
	var_Items->PutItemHeight(h,24);
	var_Items->PutSortableItem(h,VARIANT_FALSE);
	h1 = var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->PutCellValue(h1,long(1),long(1));
	var_Items->PutCellValue(h1,long(2),long(2));
	var_Items->PutCellValue(h1,long(3),long(3));
	h1 = var_Items->InsertItem(h,vtMissing,"Child 2");
	var_Items->PutCellValue(h1,long(1),long(4));
	var_Items->PutCellValue(h1,long(2),long(5));
	var_Items->PutCellValue(h1,long(3),long(6));
	var_Items->PutExpandItem(h,VARIANT_TRUE);

653
Is it possible to specify the cell's value but still want to display some formatted text instead the value

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutMarkSearchColumn(VARIANT_FALSE);
EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns();
	var_Columns->Add(L"Name");
	EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Values")));
		var_Column->PutSortType(EXGRIDLib::SortNumeric);
		var_Column->PutAllowSizing(VARIANT_FALSE);
		var_Column->PutWidth(64);
		var_Column->PutFormatColumn(L"((0:=dbl(value)) < 10? '<fgcolor=808080><font ;7>' :'<b>') + currency(=:0)");
		var_Column->PutDef(EXGRIDLib::exCellValueFormat,long(1));
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("Root");
	var_Items->PutFormatCell(h,long(1),L"'<none>'");
	var_Items->PutCellValue(var_Items->InsertItem(h,vtMissing,"Child 1"),long(1),long(10));
	var_Items->PutCellValue(var_Items->InsertItem(h,vtMissing,"Child 2"),long(1),long(15));
	var_Items->PutCellValue(var_Items->InsertItem(h,vtMissing,"Child 3"),long(1),long(25));
	var_Items->PutExpandItem(h,VARIANT_TRUE);
spGrid1->EndUpdate();

652
I am using the FormatColumn to display the current currency, but would like hide some values. Is it possible

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutMarkSearchColumn(VARIANT_FALSE);
EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns();
	var_Columns->Add(L"Name");
	EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Values")));
		var_Column->PutSortType(EXGRIDLib::SortNumeric);
		var_Column->PutAllowSizing(VARIANT_FALSE);
		var_Column->PutWidth(64);
		var_Column->PutFormatColumn(L"((0:=dbl(value)) < 10? '<fgcolor=808080><font ;7>' :'<b>') + currency(=:0)");
		var_Column->PutDef(EXGRIDLib::exCellValueFormat,long(1));
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("Root");
	var_Items->PutFormatCell(h,long(1),L" ");
	var_Items->PutCellValue(var_Items->InsertItem(h,vtMissing,"Child 1"),long(1),long(10));
	var_Items->PutCellValue(var_Items->InsertItem(h,vtMissing,"Child 2"),long(1),long(15));
	var_Items->PutCellValue(var_Items->InsertItem(h,vtMissing,"Child 3"),long(1),long(25));
	var_Items->PutExpandItem(h,VARIANT_TRUE);
spGrid1->EndUpdate();

651
How can I specify an item to be always the first item

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutTreeColumnIndex(-1);
((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Numbers")))->PutSortType(EXGRIDLib::SortNumeric);
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->AddItem(long(1));
	var_Items->AddItem(long(2));
	var_Items->AddItem(long(3));
	var_Items->AddItem(long(4));
	long h = var_Items->AddItem("first");
	var_Items->PutItemPosition(h,0);
	var_Items->PutCellHAlignment(h,long(0),EXGRIDLib::RightAlignment);
	var_Items->PutSortableItem(h,VARIANT_FALSE);
	var_Items->SortChildren(0,long(0),VARIANT_FALSE);
spGrid1->EndUpdate();

650
How can I specify an item to be always the last item

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutTreeColumnIndex(-1);
((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Numbers")))->PutSortType(EXGRIDLib::SortNumeric);
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->AddItem(long(1));
	var_Items->AddItem(long(2));
	var_Items->AddItem(long(3));
	var_Items->AddItem(long(4));
	long h = var_Items->AddItem("last");
	var_Items->PutCellHAlignment(h,long(0),EXGRIDLib::RightAlignment);
	var_Items->PutSortableItem(h,VARIANT_FALSE);
	var_Items->SortChildren(0,long(0),VARIANT_TRUE);
spGrid1->EndUpdate();

649
Can I allow sorting only the child items

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->GetColumns()->Add(L"Childs");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("Root 1");
	var_Items->PutSortableItem(h,VARIANT_FALSE);
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	h = var_Items->AddItem("Root 2");
	var_Items->PutSortableItem(h,VARIANT_FALSE);
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
spGrid1->EndUpdate();

648
Can I specify a terminal item so it will mark the end of childs

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutScrollBySingleLine(VARIANT_TRUE);
spGrid1->GetColumns()->Add(L"P1");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("Root 1");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	h = var_Items->InsertItem(h,"","");
	var_Items->PutItemDivider(h,0);
	var_Items->PutItemDividerLineAlignment(h,EXGRIDLib::DividerCenter);
	var_Items->PutItemHeight(h,2);
	var_Items->PutSelectableItem(h,VARIANT_FALSE);
	var_Items->PutSortableItem(h,VARIANT_FALSE);
	h = var_Items->AddItem("Root 2");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	h = var_Items->InsertItem(h,"","");
	var_Items->PutItemDivider(h,0);
	var_Items->PutItemDividerLineAlignment(h,EXGRIDLib::DividerCenter);
	var_Items->PutItemHeight(h,2);
	var_Items->PutSelectableItem(h,VARIANT_FALSE);
	var_Items->PutSortableItem(h,VARIANT_FALSE);
spGrid1->EndUpdate();

647
Is it possible to specify an item being unsortable so its position won't be changed after sorting

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutTreeColumnIndex(-1);
((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Numbers")))->PutSortType(EXGRIDLib::SortNumeric);
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->AddItem(long(1));
	var_Items->AddItem(long(2));
	var_Items->AddItem(long(3));
	var_Items->AddItem(long(4));
	long h = var_Items->AddItem("top 3");
	var_Items->PutItemPosition(h,3);
	var_Items->PutCellHAlignment(h,long(0),EXGRIDLib::RightAlignment);
	var_Items->PutSortableItem(h,VARIANT_FALSE);
	var_Items->SortChildren(0,long(0),VARIANT_FALSE);
spGrid1->EndUpdate();

646
Is it possible to move an item from a parent to another

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot);
spGrid1->GetColumns()->Add(L"Items");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->AddItem("A");
	var_Items->AddItem("B");
	var_Items->InsertItem(var_Items->AddItem("C"),"","D");
	var_Items->SetParent(var_Items->GetFindItem("D",long(0),vtMissing),var_Items->GetFindItem("A",long(0),vtMissing));
spGrid1->EndUpdate();

645
How can I change the identation for an item

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot);
spGrid1->GetColumns()->Add(L"Items");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->AddItem("A");
	var_Items->AddItem("B");
	var_Items->InsertItem(var_Items->AddItem("C"),"","D");
	var_Items->SetParent(var_Items->GetFindItem("D",long(0),vtMissing),0);
spGrid1->EndUpdate();

644
How can I arrange the control's header on multiple levels

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutDefaultItemHeight(48);
EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns();
	((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Title")))->PutVisible(VARIANT_FALSE);
	((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"FirstName")))->PutVisible(VARIANT_FALSE);
	((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"LastName")))->PutVisible(VARIANT_FALSE);
	((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Photo")))->PutVisible(VARIANT_FALSE);
	EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Address")));
		var_Column->PutVisible(VARIANT_FALSE);
		var_Column->PutDef(EXGRIDLib::exCellSingleLine,VARIANT_FALSE);
	EXGRIDLib::IColumnPtr var_Column1 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Personal Info")));
		var_Column1->PutFormatLevel(L"3:48,(0/1/2),4:96");
		var_Column1->PutDef(EXGRIDLib::exCellFormatLevel,"3:48,(0/1/2),4:96");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("Sales Representative");
	var_Items->PutCellValue(h,long(1),"Nancy");
	var_Items->PutCellValue(h,long(2),"Davolio");
	var_Items->PutCellPicture(h,long(3),((IDispatch*)(spGrid1->ExecuteTemplate("loadpicture(`c:\\exontrol\\images\\zipdisk.gif`)"))));
	var_Items->PutCellValue(h,long(4),"507-20th Ave. E.Apt.  2A");
spGrid1->EndUpdate();

643
How can I filter programatically using more columns

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns();
	var_Columns->Add(L"Car");
	var_Columns->Add(L"Equipment");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->PutCellValue(var_Items->AddItem("Mazda"),long(1),"Air Bag");
	var_Items->PutCellValue(var_Items->AddItem("Toyota"),long(1),"Air Bag,Air condition");
	var_Items->PutCellValue(var_Items->AddItem("Ford"),long(1),"Air condition");
	var_Items->PutCellValue(var_Items->AddItem("Nissan"),long(1),"Air Bag,ABS,ESP");
	var_Items->PutCellValue(var_Items->AddItem("Mazda"),long(1),"Air Bag, ABS,ESP");
	var_Items->PutCellValue(var_Items->AddItem("Mazda"),long(1),"ABS,ESP");
EXGRIDLib::IColumnPtr var_Column = spGrid1->GetColumns()->GetItem("Car");
	var_Column->PutFilterType(EXGRIDLib::exFilter);
	var_Column->PutFilter(L"Mazda");
EXGRIDLib::IColumnPtr var_Column1 = spGrid1->GetColumns()->GetItem("Equipment");
	var_Column1->PutFilterType(EXGRIDLib::exPattern);
	var_Column1->PutFilter(L"*ABS*|*ESP*");
spGrid1->ApplyFilter();
spGrid1->EndUpdate();

642
How can I show the ticks for a single slider field

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Slider")))->GetEditor()->PutEditType(EXGRIDLib::SliderType);
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->AddItem(long(10));
	EXGRIDLib::IEditorPtr var_Editor = var_Items->GetCellEditor(var_Items->AddItem(long(20)),long(0));
		var_Editor->PutEditType(EXGRIDLib::SliderType);
		var_Editor->PutOption(EXGRIDLib::exSliderTickFrequency,long(10));
	var_Items->AddItem(long(30));
spGrid1->EndUpdate();

641
Is it possible to show ticks for slider fields

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
EXGRIDLib::IEditorPtr var_Editor = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Slider")))->GetEditor();
	var_Editor->PutEditType(EXGRIDLib::SliderType);
	var_Editor->PutOption(EXGRIDLib::exSliderTickFrequency,long(10));
spGrid1->GetItems()->AddItem(long(10));

640
Is it possible to colour a particular column, I mean the cell's foreground color

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
EXGRIDLib::IConditionalFormatPtr var_ConditionalFormat = spGrid1->GetConditionalFormats()->Add(L"1",vtMissing);
	var_ConditionalFormat->PutForeColor(RGB(255,0,0));
	var_ConditionalFormat->PutApplyTo(EXGRIDLib::FormatApplyToEnum(0x1));
spGrid1->PutMarkSearchColumn(VARIANT_FALSE);
EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns();
	var_Columns->Add(L"Column 1");
	var_Columns->Add(L"Column 2");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->PutCellValue(var_Items->AddItem(long(0)),long(1),long(1));
	var_Items->PutCellValue(var_Items->AddItem(long(2)),long(1),long(3));
	var_Items->PutCellValue(var_Items->AddItem(long(4)),long(1),long(5));
spGrid1->EndUpdate();

639
Is it possible to colour a particular column for specified values

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
EXGRIDLib::IConditionalFormatPtr var_ConditionalFormat = spGrid1->GetConditionalFormats()->Add(L"int(%1) in (3,4,5)",vtMissing);
	var_ConditionalFormat->PutBackColor(RGB(255,0,0));
	var_ConditionalFormat->PutApplyTo(EXGRIDLib::FormatApplyToEnum(0x1));
spGrid1->PutMarkSearchColumn(VARIANT_FALSE);
EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns();
	var_Columns->Add(L"Column 1");
	var_Columns->Add(L"Column 2");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->PutCellValue(var_Items->AddItem(long(0)),long(1),long(1));
	var_Items->PutCellValue(var_Items->AddItem(long(2)),long(1),long(3));
	var_Items->PutCellValue(var_Items->AddItem(long(4)),long(1),long(5));
spGrid1->EndUpdate();

638
Is it possible to colour a particular column

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutMarkSearchColumn(VARIANT_FALSE);
EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns();
	var_Columns->Add(L"Column 1");
	((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Column 2")))->PutDef(EXGRIDLib::exCellBackColor,long(255));
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->PutCellValue(var_Items->AddItem(long(0)),long(1),long(1));
	var_Items->PutCellValue(var_Items->AddItem(long(2)),long(1),long(3));
	var_Items->PutCellValue(var_Items->AddItem(long(4)),long(1),long(5));
spGrid1->EndUpdate();

637
How do i get all the children items that are under a certain parent Item handle
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot);
spGrid1->GetColumns()->Add(L"P");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("Root");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
EXGRIDLib::IItemsPtr var_Items1 = spGrid1->GetItems();
	long hChild = var_Items1->GetItemChild(var_Items1->GetFirstVisibleItem());
	OutputDebugStringW( _bstr_t(var_Items1->GetCellValue(hChild,long(0))) );
	OutputDebugStringW( _bstr_t(var_Items1->GetCellValue(var_Items1->GetNextSiblingItem(hChild),long(0))) );
spGrid1->EndUpdate();

636
Is is possible to use HTML tags to display in the filter caption

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutFilterBarPromptVisible(EXGRIDLib::exFilterBarPromptVisible);
spGrid1->PutFilterBarCaption(L"This is a bit of text being displayed in the filter bar.");
spGrid1->GetColumns()->Add(L"");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->AddItem("Item 1");
	var_Items->AddItem("Item 2");
	var_Items->AddItem("Item 3");
spGrid1->EndUpdate();

635
How can I find the number of items after filtering
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->GetColumns()->Add(L"");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("");
	var_Items->PutCellValue(h,long(0),var_Items->GetVisibleItemCount());
spGrid1->EndUpdate();

634
How can I change the filter caption

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutColumnAutoResize(VARIANT_TRUE);
spGrid1->PutContinueColumnScroll(VARIANT_FALSE);
spGrid1->PutFocusColumnIndex(1);
spGrid1->PutMarkSearchColumn(VARIANT_FALSE);
spGrid1->PutSearchColumnIndex(1);
spGrid1->PutFilterBarPromptVisible(EXGRIDLib::exFilterBarPromptVisible);
spGrid1->PutFilterBarPromptType(EXGRIDLib::FilterPromptEnum(EXGRIDLib::exFilterPromptWords | EXGRIDLib::exFilterPromptContainsAll));
spGrid1->PutFilterBarPromptPattern(L"london robert");
spGrid1->PutFilterBarCaption(L"<r>Found: ... ");
EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns();
	((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Name")))->PutWidth(96);
	((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Title")))->PutWidth(96);
	var_Columns->Add(L"City");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h0 = var_Items->AddItem("Nancy Davolio");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"Seattle");
	h0 = var_Items->AddItem("Andrew Fuller");
	var_Items->PutCellValue(h0,long(1),"Vice President, Sales");
	var_Items->PutCellValue(h0,long(2),"Tacoma");
	var_Items->PutSelectItem(h0,VARIANT_TRUE);
	h0 = var_Items->AddItem("Janet Leverling");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"Kirkland");
	h0 = var_Items->AddItem("Margaret Peacock");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"Redmond");
	h0 = var_Items->AddItem("Steven Buchanan");
	var_Items->PutCellValue(h0,long(1),"Sales Manager");
	var_Items->PutCellValue(h0,long(2),"London");
	h0 = var_Items->AddItem("Michael Suyama");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"London");
	h0 = var_Items->AddItem("Robert King");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"London");
	h0 = var_Items->AddItem("Laura Callahan");
	var_Items->PutCellValue(h0,long(1),"Inside Sales Coordinator");
	var_Items->PutCellValue(h0,long(2),"Seattle");
	h0 = var_Items->AddItem("Anne Dodsworth");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"London");
spGrid1->EndUpdate();

633
While using the filter prompt is it is possible to use wild characters

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutColumnAutoResize(VARIANT_TRUE);
spGrid1->PutContinueColumnScroll(VARIANT_FALSE);
spGrid1->PutFocusColumnIndex(1);
spGrid1->PutMarkSearchColumn(VARIANT_FALSE);
spGrid1->PutSearchColumnIndex(1);
spGrid1->PutFilterBarPromptVisible(EXGRIDLib::exFilterBarPromptVisible);
spGrid1->PutFilterBarPromptType(EXGRIDLib::exFilterPromptPattern);
spGrid1->PutFilterBarPromptPattern(L"lon* seat*");
EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns();
	((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Name")))->PutWidth(96);
	((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Title")))->PutWidth(96);
	var_Columns->Add(L"City");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h0 = var_Items->AddItem("Nancy Davolio");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"Seattle");
	h0 = var_Items->AddItem("Andrew Fuller");
	var_Items->PutCellValue(h0,long(1),"Vice President, Sales");
	var_Items->PutCellValue(h0,long(2),"Tacoma");
	var_Items->PutSelectItem(h0,VARIANT_TRUE);
	h0 = var_Items->AddItem("Janet Leverling");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"Kirkland");
	h0 = var_Items->AddItem("Margaret Peacock");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"Redmond");
	h0 = var_Items->AddItem("Steven Buchanan");
	var_Items->PutCellValue(h0,long(1),"Sales Manager");
	var_Items->PutCellValue(h0,long(2),"London");
	h0 = var_Items->AddItem("Michael Suyama");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"London");
	h0 = var_Items->AddItem("Robert King");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"London");
	h0 = var_Items->AddItem("Laura Callahan");
	var_Items->PutCellValue(h0,long(1),"Inside Sales Coordinator");
	var_Items->PutCellValue(h0,long(2),"Seattle");
	h0 = var_Items->AddItem("Anne Dodsworth");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"London");
spGrid1->EndUpdate();

632
How can I list all items that contains any of specified words, not necessary at the beggining

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutColumnAutoResize(VARIANT_TRUE);
spGrid1->PutContinueColumnScroll(VARIANT_FALSE);
spGrid1->PutFocusColumnIndex(1);
spGrid1->PutMarkSearchColumn(VARIANT_FALSE);
spGrid1->PutSearchColumnIndex(1);
spGrid1->PutFilterBarPromptVisible(EXGRIDLib::exFilterBarPromptVisible);
spGrid1->PutFilterBarPromptType(EXGRIDLib::FilterPromptEnum(EXGRIDLib::exFilterPromptStartWords | EXGRIDLib::exFilterPromptContainsAny));
spGrid1->PutFilterBarPromptPattern(L"london davolio");
EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns();
	((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Name")))->PutWidth(96);
	((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Title")))->PutWidth(96);
	var_Columns->Add(L"City");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h0 = var_Items->AddItem("Nancy Davolio");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"Seattle");
	h0 = var_Items->AddItem("Andrew Fuller");
	var_Items->PutCellValue(h0,long(1),"Vice President, Sales");
	var_Items->PutCellValue(h0,long(2),"Tacoma");
	var_Items->PutSelectItem(h0,VARIANT_TRUE);
	h0 = var_Items->AddItem("Janet Leverling");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"Kirkland");
	h0 = var_Items->AddItem("Margaret Peacock");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"Redmond");
	h0 = var_Items->AddItem("Steven Buchanan");
	var_Items->PutCellValue(h0,long(1),"Sales Manager");
	var_Items->PutCellValue(h0,long(2),"London");
	h0 = var_Items->AddItem("Michael Suyama");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"London");
	h0 = var_Items->AddItem("Robert King");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"London");
	h0 = var_Items->AddItem("Laura Callahan");
	var_Items->PutCellValue(h0,long(1),"Inside Sales Coordinator");
	var_Items->PutCellValue(h0,long(2),"Seattle");
	h0 = var_Items->AddItem("Anne Dodsworth");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"London");
spGrid1->EndUpdate();

631
How can I list all items that contains any of specified words, not strings

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutColumnAutoResize(VARIANT_TRUE);
spGrid1->PutContinueColumnScroll(VARIANT_FALSE);
spGrid1->PutFocusColumnIndex(1);
spGrid1->PutMarkSearchColumn(VARIANT_FALSE);
spGrid1->PutSearchColumnIndex(1);
spGrid1->PutFilterBarPromptVisible(EXGRIDLib::exFilterBarPromptVisible);
spGrid1->PutFilterBarPromptType(EXGRIDLib::FilterPromptEnum(EXGRIDLib::exFilterPromptWords | EXGRIDLib::exFilterPromptContainsAny));
spGrid1->PutFilterBarPromptPattern(L"london nancy");
EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns();
	((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Name")))->PutWidth(96);
	((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Title")))->PutWidth(96);
	var_Columns->Add(L"City");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h0 = var_Items->AddItem("Nancy Davolio");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"Seattle");
	h0 = var_Items->AddItem("Andrew Fuller");
	var_Items->PutCellValue(h0,long(1),"Vice President, Sales");
	var_Items->PutCellValue(h0,long(2),"Tacoma");
	var_Items->PutSelectItem(h0,VARIANT_TRUE);
	h0 = var_Items->AddItem("Janet Leverling");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"Kirkland");
	h0 = var_Items->AddItem("Margaret Peacock");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"Redmond");
	h0 = var_Items->AddItem("Steven Buchanan");
	var_Items->PutCellValue(h0,long(1),"Sales Manager");
	var_Items->PutCellValue(h0,long(2),"London");
	h0 = var_Items->AddItem("Michael Suyama");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"London");
	h0 = var_Items->AddItem("Robert King");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"London");
	h0 = var_Items->AddItem("Laura Callahan");
	var_Items->PutCellValue(h0,long(1),"Inside Sales Coordinator");
	var_Items->PutCellValue(h0,long(2),"Seattle");
	h0 = var_Items->AddItem("Anne Dodsworth");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"London");
spGrid1->EndUpdate();

630
How can I list all items that contains all specified words, not strings

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutColumnAutoResize(VARIANT_TRUE);
spGrid1->PutContinueColumnScroll(VARIANT_FALSE);
spGrid1->PutFocusColumnIndex(1);
spGrid1->PutMarkSearchColumn(VARIANT_FALSE);
spGrid1->PutSearchColumnIndex(1);
spGrid1->PutFilterBarPromptVisible(EXGRIDLib::exFilterBarPromptVisible);
spGrid1->PutFilterBarPromptType(EXGRIDLib::FilterPromptEnum(EXGRIDLib::exFilterPromptWords | EXGRIDLib::exFilterPromptContainsAll));
spGrid1->PutFilterBarPromptPattern(L"london robert");
EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns();
	((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Name")))->PutWidth(96);
	((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Title")))->PutWidth(96);
	var_Columns->Add(L"City");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h0 = var_Items->AddItem("Nancy Davolio");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"Seattle");
	h0 = var_Items->AddItem("Andrew Fuller");
	var_Items->PutCellValue(h0,long(1),"Vice President, Sales");
	var_Items->PutCellValue(h0,long(2),"Tacoma");
	var_Items->PutSelectItem(h0,VARIANT_TRUE);
	h0 = var_Items->AddItem("Janet Leverling");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"Kirkland");
	h0 = var_Items->AddItem("Margaret Peacock");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"Redmond");
	h0 = var_Items->AddItem("Steven Buchanan");
	var_Items->PutCellValue(h0,long(1),"Sales Manager");
	var_Items->PutCellValue(h0,long(2),"London");
	h0 = var_Items->AddItem("Michael Suyama");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"London");
	h0 = var_Items->AddItem("Robert King");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"London");
	h0 = var_Items->AddItem("Laura Callahan");
	var_Items->PutCellValue(h0,long(1),"Inside Sales Coordinator");
	var_Items->PutCellValue(h0,long(2),"Seattle");
	h0 = var_Items->AddItem("Anne Dodsworth");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"London");
spGrid1->EndUpdate();

629
I've noticed that the filtering by prompt is not case sensitive, is is possible to make it case sensitive

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutColumnAutoResize(VARIANT_TRUE);
spGrid1->PutContinueColumnScroll(VARIANT_FALSE);
spGrid1->PutFocusColumnIndex(1);
spGrid1->PutMarkSearchColumn(VARIANT_FALSE);
spGrid1->PutSearchColumnIndex(1);
spGrid1->PutFilterBarPromptVisible(EXGRIDLib::exFilterBarPromptVisible);
spGrid1->PutFilterBarPromptType(EXGRIDLib::FilterPromptEnum(EXGRIDLib::exFilterPromptCaseSensitive | EXGRIDLib::exFilterPromptContainsAny));
spGrid1->PutFilterBarPromptPattern(L"Anne");
EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns();
	((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Name")))->PutWidth(96);
	((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Title")))->PutWidth(96);
	var_Columns->Add(L"City");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h0 = var_Items->AddItem("Nancy Davolio");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"Seattle");
	h0 = var_Items->AddItem("Andrew Fuller");
	var_Items->PutCellValue(h0,long(1),"Vice President, Sales");
	var_Items->PutCellValue(h0,long(2),"Tacoma");
	var_Items->PutSelectItem(h0,VARIANT_TRUE);
	h0 = var_Items->AddItem("Janet Leverling");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"Kirkland");
	h0 = var_Items->AddItem("Margaret Peacock");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"Redmond");
	h0 = var_Items->AddItem("Steven Buchanan");
	var_Items->PutCellValue(h0,long(1),"Sales Manager");
	var_Items->PutCellValue(h0,long(2),"London");
	h0 = var_Items->AddItem("Michael Suyama");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"London");
	h0 = var_Items->AddItem("Robert King");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"London");
	h0 = var_Items->AddItem("Laura Callahan");
	var_Items->PutCellValue(h0,long(1),"Inside Sales Coordinator");
	var_Items->PutCellValue(h0,long(2),"Seattle");
	h0 = var_Items->AddItem("Anne Dodsworth");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"London");
spGrid1->EndUpdate();

628
Is it possible to list only items that ends with any of specified strings

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutColumnAutoResize(VARIANT_TRUE);
spGrid1->PutContinueColumnScroll(VARIANT_FALSE);
spGrid1->PutFocusColumnIndex(1);
spGrid1->PutMarkSearchColumn(VARIANT_FALSE);
spGrid1->PutSearchColumnIndex(1);
spGrid1->PutFilterBarPromptVisible(EXGRIDLib::exFilterBarPromptVisible);
spGrid1->PutFilterBarPromptType(EXGRIDLib::exFilterPromptEndWith);
spGrid1->PutFilterBarPromptColumns("0");
spGrid1->PutFilterBarPromptPattern(L"Fuller");
EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns();
	((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Name")))->PutWidth(96);
	((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Title")))->PutWidth(96);
	var_Columns->Add(L"City");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h0 = var_Items->AddItem("Nancy Davolio");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"Seattle");
	h0 = var_Items->AddItem("Andrew Fuller");
	var_Items->PutCellValue(h0,long(1),"Vice President, Sales");
	var_Items->PutCellValue(h0,long(2),"Tacoma");
	var_Items->PutSelectItem(h0,VARIANT_TRUE);
	h0 = var_Items->AddItem("Janet Leverling");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"Kirkland");
	h0 = var_Items->AddItem("Margaret Peacock");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"Redmond");
	h0 = var_Items->AddItem("Steven Buchanan");
	var_Items->PutCellValue(h0,long(1),"Sales Manager");
	var_Items->PutCellValue(h0,long(2),"London");
	h0 = var_Items->AddItem("Michael Suyama");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"London");
	h0 = var_Items->AddItem("Robert King");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"London");
	h0 = var_Items->AddItem("Laura Callahan");
	var_Items->PutCellValue(h0,long(1),"Inside Sales Coordinator");
	var_Items->PutCellValue(h0,long(2),"Seattle");
	h0 = var_Items->AddItem("Anne Dodsworth");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"London");
spGrid1->EndUpdate();

627
Is it possible to list only items that ends with any of specified strings

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutColumnAutoResize(VARIANT_TRUE);
spGrid1->PutContinueColumnScroll(VARIANT_FALSE);
spGrid1->PutFocusColumnIndex(1);
spGrid1->PutMarkSearchColumn(VARIANT_FALSE);
spGrid1->PutSearchColumnIndex(1);
spGrid1->PutFilterBarPromptVisible(EXGRIDLib::exFilterBarPromptVisible);
spGrid1->PutFilterBarPromptType(EXGRIDLib::exFilterPromptEndWith);
spGrid1->PutFilterBarPromptColumns("0");
spGrid1->PutFilterBarPromptPattern(L"Fuller");
EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns();
	((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Name")))->PutWidth(96);
	((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Title")))->PutWidth(96);
	var_Columns->Add(L"City");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h0 = var_Items->AddItem("Nancy Davolio");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"Seattle");
	h0 = var_Items->AddItem("Andrew Fuller");
	var_Items->PutCellValue(h0,long(1),"Vice President, Sales");
	var_Items->PutCellValue(h0,long(2),"Tacoma");
	var_Items->PutSelectItem(h0,VARIANT_TRUE);
	h0 = var_Items->AddItem("Janet Leverling");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"Kirkland");
	h0 = var_Items->AddItem("Margaret Peacock");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"Redmond");
	h0 = var_Items->AddItem("Steven Buchanan");
	var_Items->PutCellValue(h0,long(1),"Sales Manager");
	var_Items->PutCellValue(h0,long(2),"London");
	h0 = var_Items->AddItem("Michael Suyama");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"London");
	h0 = var_Items->AddItem("Robert King");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"London");
	h0 = var_Items->AddItem("Laura Callahan");
	var_Items->PutCellValue(h0,long(1),"Inside Sales Coordinator");
	var_Items->PutCellValue(h0,long(2),"Seattle");
	h0 = var_Items->AddItem("Anne Dodsworth");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"London");
spGrid1->EndUpdate();

626
Is it possible to list only items that starts with any of specified strings

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutColumnAutoResize(VARIANT_TRUE);
spGrid1->PutContinueColumnScroll(VARIANT_FALSE);
spGrid1->PutFocusColumnIndex(1);
spGrid1->PutMarkSearchColumn(VARIANT_FALSE);
spGrid1->PutSearchColumnIndex(1);
spGrid1->PutFilterBarPromptVisible(EXGRIDLib::exFilterBarPromptVisible);
spGrid1->PutFilterBarPromptType(EXGRIDLib::exFilterPromptStartWith);
spGrid1->PutFilterBarPromptColumns("0");
spGrid1->PutFilterBarPromptPattern(L"An M");
EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns();
	((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Name")))->PutWidth(96);
	((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Title")))->PutWidth(96);
	var_Columns->Add(L"City");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h0 = var_Items->AddItem("Nancy Davolio");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"Seattle");
	h0 = var_Items->AddItem("Andrew Fuller");
	var_Items->PutCellValue(h0,long(1),"Vice President, Sales");
	var_Items->PutCellValue(h0,long(2),"Tacoma");
	var_Items->PutSelectItem(h0,VARIANT_TRUE);
	h0 = var_Items->AddItem("Janet Leverling");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"Kirkland");
	h0 = var_Items->AddItem("Margaret Peacock");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"Redmond");
	h0 = var_Items->AddItem("Steven Buchanan");
	var_Items->PutCellValue(h0,long(1),"Sales Manager");
	var_Items->PutCellValue(h0,long(2),"London");
	h0 = var_Items->AddItem("Michael Suyama");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"London");
	h0 = var_Items->AddItem("Robert King");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"London");
	h0 = var_Items->AddItem("Laura Callahan");
	var_Items->PutCellValue(h0,long(1),"Inside Sales Coordinator");
	var_Items->PutCellValue(h0,long(2),"Seattle");
	h0 = var_Items->AddItem("Anne Dodsworth");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"London");
spGrid1->EndUpdate();

625
Is it possible to list only items that starts with specified string

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutColumnAutoResize(VARIANT_TRUE);
spGrid1->PutContinueColumnScroll(VARIANT_FALSE);
spGrid1->PutFocusColumnIndex(1);
spGrid1->PutMarkSearchColumn(VARIANT_FALSE);
spGrid1->PutSearchColumnIndex(1);
spGrid1->PutFilterBarPromptVisible(EXGRIDLib::exFilterBarPromptVisible);
spGrid1->PutFilterBarPromptType(EXGRIDLib::exFilterPromptStartWith);
spGrid1->PutFilterBarPromptColumns("0");
spGrid1->PutFilterBarPromptPattern(L"A");
EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns();
	((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Name")))->PutWidth(96);
	((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Title")))->PutWidth(96);
	var_Columns->Add(L"City");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h0 = var_Items->AddItem("Nancy Davolio");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"Seattle");
	h0 = var_Items->AddItem("Andrew Fuller");
	var_Items->PutCellValue(h0,long(1),"Vice President, Sales");
	var_Items->PutCellValue(h0,long(2),"Tacoma");
	var_Items->PutSelectItem(h0,VARIANT_TRUE);
	h0 = var_Items->AddItem("Janet Leverling");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"Kirkland");
	h0 = var_Items->AddItem("Margaret Peacock");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"Redmond");
	h0 = var_Items->AddItem("Steven Buchanan");
	var_Items->PutCellValue(h0,long(1),"Sales Manager");
	var_Items->PutCellValue(h0,long(2),"London");
	h0 = var_Items->AddItem("Michael Suyama");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"London");
	h0 = var_Items->AddItem("Robert King");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"London");
	h0 = var_Items->AddItem("Laura Callahan");
	var_Items->PutCellValue(h0,long(1),"Inside Sales Coordinator");
	var_Items->PutCellValue(h0,long(2),"Seattle");
	h0 = var_Items->AddItem("Anne Dodsworth");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"London");
spGrid1->EndUpdate();

624
How can I specify that the list should include any of the seqeunces in the pattern

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutColumnAutoResize(VARIANT_TRUE);
spGrid1->PutContinueColumnScroll(VARIANT_FALSE);
spGrid1->PutFocusColumnIndex(1);
spGrid1->PutMarkSearchColumn(VARIANT_FALSE);
spGrid1->PutSearchColumnIndex(1);
spGrid1->PutFilterBarPromptVisible(EXGRIDLib::exFilterBarPromptVisible);
spGrid1->PutFilterBarPromptType(EXGRIDLib::exFilterPromptContainsAny);
spGrid1->PutFilterBarPromptPattern(L"london seattle");
EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns();
	((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Name")))->PutWidth(96);
	((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Title")))->PutWidth(96);
	var_Columns->Add(L"City");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h0 = var_Items->AddItem("Nancy Davolio");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"Seattle");
	h0 = var_Items->AddItem("Andrew Fuller");
	var_Items->PutCellValue(h0,long(1),"Vice President, Sales");
	var_Items->PutCellValue(h0,long(2),"Tacoma");
	var_Items->PutSelectItem(h0,VARIANT_TRUE);
	h0 = var_Items->AddItem("Janet Leverling");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"Kirkland");
	h0 = var_Items->AddItem("Margaret Peacock");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"Redmond");
	h0 = var_Items->AddItem("Steven Buchanan");
	var_Items->PutCellValue(h0,long(1),"Sales Manager");
	var_Items->PutCellValue(h0,long(2),"London");
	h0 = var_Items->AddItem("Michael Suyama");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"London");
	h0 = var_Items->AddItem("Robert King");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"London");
	h0 = var_Items->AddItem("Laura Callahan");
	var_Items->PutCellValue(h0,long(1),"Inside Sales Coordinator");
	var_Items->PutCellValue(h0,long(2),"Seattle");
	h0 = var_Items->AddItem("Anne Dodsworth");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"London");
spGrid1->EndUpdate();

623
How can I specify that all sequences in the filter pattern must be included in the list

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutColumnAutoResize(VARIANT_TRUE);
spGrid1->PutContinueColumnScroll(VARIANT_FALSE);
spGrid1->PutFocusColumnIndex(1);
spGrid1->PutMarkSearchColumn(VARIANT_FALSE);
spGrid1->PutSearchColumnIndex(1);
spGrid1->PutFilterBarPromptVisible(EXGRIDLib::exFilterBarPromptVisible);
spGrid1->PutFilterBarPromptType(EXGRIDLib::exFilterPromptContainsAll);
spGrid1->PutFilterBarPromptPattern(L"london manager");
EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns();
	((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Name")))->PutWidth(96);
	((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Title")))->PutWidth(96);
	var_Columns->Add(L"City");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h0 = var_Items->AddItem("Nancy Davolio");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"Seattle");
	h0 = var_Items->AddItem("Andrew Fuller");
	var_Items->PutCellValue(h0,long(1),"Vice President, Sales");
	var_Items->PutCellValue(h0,long(2),"Tacoma");
	var_Items->PutSelectItem(h0,VARIANT_TRUE);
	h0 = var_Items->AddItem("Janet Leverling");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"Kirkland");
	h0 = var_Items->AddItem("Margaret Peacock");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"Redmond");
	h0 = var_Items->AddItem("Steven Buchanan");
	var_Items->PutCellValue(h0,long(1),"Sales Manager");
	var_Items->PutCellValue(h0,long(2),"London");
	h0 = var_Items->AddItem("Michael Suyama");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"London");
	h0 = var_Items->AddItem("Robert King");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"London");
	h0 = var_Items->AddItem("Laura Callahan");
	var_Items->PutCellValue(h0,long(1),"Inside Sales Coordinator");
	var_Items->PutCellValue(h0,long(2),"Seattle");
	h0 = var_Items->AddItem("Anne Dodsworth");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"London");
spGrid1->EndUpdate();

622
How do I change at runtime the filter prompt

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutColumnAutoResize(VARIANT_TRUE);
spGrid1->PutContinueColumnScroll(VARIANT_FALSE);
spGrid1->PutFocusColumnIndex(1);
spGrid1->PutMarkSearchColumn(VARIANT_FALSE);
spGrid1->PutSearchColumnIndex(1);
spGrid1->PutFilterBarPromptVisible(EXGRIDLib::exFilterBarPromptVisible);
spGrid1->PutFilterBarPromptPattern(L"london manager");
EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns();
	((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Name")))->PutWidth(96);
	((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Title")))->PutWidth(96);
	var_Columns->Add(L"City");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h0 = var_Items->AddItem("Nancy Davolio");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"Seattle");
	h0 = var_Items->AddItem("Andrew Fuller");
	var_Items->PutCellValue(h0,long(1),"Vice President, Sales");
	var_Items->PutCellValue(h0,long(2),"Tacoma");
	var_Items->PutSelectItem(h0,VARIANT_TRUE);
	h0 = var_Items->AddItem("Janet Leverling");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"Kirkland");
	h0 = var_Items->AddItem("Margaret Peacock");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"Redmond");
	h0 = var_Items->AddItem("Steven Buchanan");
	var_Items->PutCellValue(h0,long(1),"Sales Manager");
	var_Items->PutCellValue(h0,long(2),"London");
	h0 = var_Items->AddItem("Michael Suyama");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"London");
	h0 = var_Items->AddItem("Robert King");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"London");
	h0 = var_Items->AddItem("Laura Callahan");
	var_Items->PutCellValue(h0,long(1),"Inside Sales Coordinator");
	var_Items->PutCellValue(h0,long(2),"Seattle");
	h0 = var_Items->AddItem("Anne Dodsworth");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"London");
spGrid1->EndUpdate();

621
How do I specify to filter only a single column when using the filter prompt

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutColumnAutoResize(VARIANT_TRUE);
spGrid1->PutContinueColumnScroll(VARIANT_FALSE);
spGrid1->PutFocusColumnIndex(1);
spGrid1->PutMarkSearchColumn(VARIANT_FALSE);
spGrid1->PutSearchColumnIndex(1);
spGrid1->PutFilterBarPromptVisible(EXGRIDLib::exFilterBarPromptVisible);
spGrid1->PutFilterBarPromptColumns("2,3");
spGrid1->PutFilterBarPromptPattern(L"london");
EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns();
	((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Name")))->PutWidth(96);
	((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Title")))->PutWidth(96);
	var_Columns->Add(L"City");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h0 = var_Items->AddItem("Nancy Davolio");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"Seattle");
	h0 = var_Items->AddItem("Andrew Fuller");
	var_Items->PutCellValue(h0,long(1),"Vice President, Sales");
	var_Items->PutCellValue(h0,long(2),"Tacoma");
	var_Items->PutSelectItem(h0,VARIANT_TRUE);
	h0 = var_Items->AddItem("Janet Leverling");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"Kirkland");
	h0 = var_Items->AddItem("Margaret Peacock");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"Redmond");
	h0 = var_Items->AddItem("Steven Buchanan");
	var_Items->PutCellValue(h0,long(1),"Sales Manager");
	var_Items->PutCellValue(h0,long(2),"London");
	h0 = var_Items->AddItem("Michael Suyama");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"London");
	h0 = var_Items->AddItem("Robert King");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"London");
	h0 = var_Items->AddItem("Laura Callahan");
	var_Items->PutCellValue(h0,long(1),"Inside Sales Coordinator");
	var_Items->PutCellValue(h0,long(2),"Seattle");
	h0 = var_Items->AddItem("Anne Dodsworth");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"London");
spGrid1->EndUpdate();

620
How do I change the prompt or the caption being displayed in the filter bar

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutColumnAutoResize(VARIANT_TRUE);
spGrid1->PutContinueColumnScroll(VARIANT_FALSE);
spGrid1->PutFocusColumnIndex(1);
spGrid1->PutMarkSearchColumn(VARIANT_FALSE);
spGrid1->PutSearchColumnIndex(1);
spGrid1->PutFilterBarPromptVisible(EXGRIDLib::exFilterBarPromptVisible);
spGrid1->PutFilterBarPrompt(L"changed");
EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns();
	((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Name")))->PutWidth(96);
	((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Title")))->PutWidth(96);
	var_Columns->Add(L"City");
spGrid1->EndUpdate();

619
How do I enable the filter prompt feature

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutColumnAutoResize(VARIANT_TRUE);
spGrid1->PutContinueColumnScroll(VARIANT_FALSE);
spGrid1->PutFocusColumnIndex(1);
spGrid1->PutMarkSearchColumn(VARIANT_FALSE);
spGrid1->PutSearchColumnIndex(1);
spGrid1->PutFilterBarPromptVisible(EXGRIDLib::exFilterBarPromptVisible);
EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns();
	((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Name")))->PutWidth(96);
	((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Title")))->PutWidth(96);
	var_Columns->Add(L"City");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h0 = var_Items->AddItem("Nancy Davolio");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"Seattle");
	h0 = var_Items->AddItem("Andrew Fuller");
	var_Items->PutCellValue(h0,long(1),"Vice President, Sales");
	var_Items->PutCellValue(h0,long(2),"Tacoma");
	var_Items->PutSelectItem(h0,VARIANT_TRUE);
	h0 = var_Items->AddItem("Janet Leverling");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"Kirkland");
	h0 = var_Items->AddItem("Margaret Peacock");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"Redmond");
	h0 = var_Items->AddItem("Steven Buchanan");
	var_Items->PutCellValue(h0,long(1),"Sales Manager");
	var_Items->PutCellValue(h0,long(2),"London");
	h0 = var_Items->AddItem("Michael Suyama");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"London");
	h0 = var_Items->AddItem("Robert King");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"London");
	h0 = var_Items->AddItem("Laura Callahan");
	var_Items->PutCellValue(h0,long(1),"Inside Sales Coordinator");
	var_Items->PutCellValue(h0,long(2),"Seattle");
	h0 = var_Items->AddItem("Anne Dodsworth");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"London");
spGrid1->EndUpdate();

618
How can I control the colors that can be applied to an EBN part

// Change event - Occurs when the user changes the cell's content.
void OnChangeGrid1(long   Item,long   ColIndex,VARIANT FAR*   NewValue)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'
		#import <ExGrid.dll>
		using namespace EXGRIDLib;
	*/
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
		var_Items->PutItemBackColor(var_Items->GetFirstVisibleItem(),NewValue);
}

EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
EXGRIDLib::IAppearancePtr var_Appearance = spGrid1->GetVisualAppearance();
	var_Appearance->Add(2,"c:\\exontrol\\images\\normal.ebn");
	var_Appearance->Add(1,"CP:2 10 3 -10 -5");
spGrid1->PutSelBackColor(spGrid1->GetBackColor());
spGrid1->PutSelForeColor(spGrid1->GetForeColor());
spGrid1->PutScrollBySingleLine(VARIANT_TRUE);
spGrid1->PutTreeColumnIndex(-1);
EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns();
	EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Test")));
		var_Column->PutWidth(32);
	EXGRIDLib::IColumnPtr var_Column1 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"RGB")));
		EXGRIDLib::IEditorPtr var_Editor = var_Column1->GetEditor();
			var_Editor->PutEditType(EXGRIDLib::SliderType);
			var_Editor->PutOption(EXGRIDLib::exSliderMax,long(255));
			var_Editor->PutOption(EXGRIDLib::exSliderWidth,long(-60));
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("");
	var_Items->PutCellHAlignment(h,long(0),EXGRIDLib::CenterAlignment);
	var_Items->PutItemDivider(h,0);
	var_Items->PutItemBackColor(h,0x1000000);
	var_Items->PutItemHeight(h,36);
	var_Items->PutSelectableItem(h,VARIANT_FALSE);
	h = var_Items->InsertItem(0,long(1),"Red");
	var_Items->PutCellValue(h,long(1),long(255));
	h = var_Items->InsertItem(0,long(255),"Green");
	var_Items->PutCellValue(h,long(1),long(255));
	h = var_Items->InsertItem(0,long(65536),"Blue");
	var_Items->PutCellValue(h,long(1),long(255));
spGrid1->EndUpdate();

617
I know this is fairly basic, but could you send me a sample that places a tree in the first column

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot);
spGrid1->GetColumns()->Add(L"heading");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("Parent 1");
	var_Items->InsertItem(h,vtMissing,"Child A");
	var_Items->InsertItem(var_Items->InsertItem(h,vtMissing,"Child B"),vtMissing,"GrandChild C");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	h = var_Items->AddItem("Parent 2");
	var_Items->InsertItem(h,vtMissing,"Child D");
	var_Items->InsertItem(h,vtMissing,"Child E");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
spGrid1->EndUpdate();

616
How can I get the caption of focused item
// SelectionChanged event - Fired after a new item has been selected.
void OnSelectionChangedGrid1()
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'
		#import <ExGrid.dll>
		using namespace EXGRIDLib;
	*/
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
		OutputDebugStringW( L"Handle" );
		OutputDebugStringW( _bstr_t(var_Items->GetFocusItem()) );
		OutputDebugStringW( L"Caption" );
		OutputDebugStringW( var_Items->GetCellCaption(var_Items->GetFocusItem(),long(0)) );
}

EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot);
spGrid1->GetColumns()->Add(L"Items");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("R1");
	var_Items->InsertItem(h,vtMissing,"Cell 1.1");
	var_Items->InsertItem(h,vtMissing,"Cell 1.2");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	h = var_Items->AddItem("R2");
	var_Items->InsertItem(h,vtMissing,"Cell 2.1");
	var_Items->InsertItem(h,vtMissing,"Cell 2.2");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
spGrid1->EndUpdate();

615
How can I get the caption of selected item
// SelectionChanged event - Fired after a new item has been selected.
void OnSelectionChangedGrid1()
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'
		#import <ExGrid.dll>
		using namespace EXGRIDLib;
	*/
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
		OutputDebugStringW( L"Handle" );
		OutputDebugStringW( _bstr_t(var_Items->GetSelectedItem(0)) );
		OutputDebugStringW( L"Caption" );
		OutputDebugStringW( var_Items->GetCellCaption(var_Items->GetSelectedItem(0),long(0)) );
}

EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot);
spGrid1->GetColumns()->Add(L"Items");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("R1");
	var_Items->InsertItem(h,vtMissing,"Cell 1.1");
	var_Items->InsertItem(h,vtMissing,"Cell 1.2");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	h = var_Items->AddItem("R2");
	var_Items->InsertItem(h,vtMissing,"Cell 2.1");
	var_Items->InsertItem(h,vtMissing,"Cell 2.2");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
spGrid1->EndUpdate();

614
Is it possible to let users selects cells as in Excel

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutFullRowSelect(EXGRIDLib::exRectSel);
spGrid1->PutSingleSel(VARIANT_FALSE);
spGrid1->PutReadOnly(EXGRIDLib::exReadOnly);
spGrid1->PutMarkSearchColumn(VARIANT_FALSE);
spGrid1->PutShowFocusRect(VARIANT_FALSE);
spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot);
spGrid1->PutSelForeColor(RGB(0,0,0));
spGrid1->PutSelBackColor(RGB(200,225,242));
EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns();
	var_Columns->Add(L"A");
	EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"B")));
		var_Column->PutAllowSizing(VARIANT_FALSE);
		var_Column->PutWidth(24);
	EXGRIDLib::IColumnPtr var_Column1 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"C")));
		var_Column1->PutAllowSizing(VARIANT_FALSE);
		var_Column1->PutWidth(24);
		var_Column1->PutDef(EXGRIDLib::exCellHasCheckBox,long(1));
		var_Column1->PutPartialCheck(VARIANT_TRUE);
	EXGRIDLib::IColumnPtr var_Column2 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"D")));
		var_Column2->PutAllowSizing(VARIANT_FALSE);
		var_Column2->PutWidth(24);
		var_Column2->PutDef(EXGRIDLib::exCellHasRadioButton,long(1));
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->InsertItem(vtMissing,vtMissing,"Group 1");
	long h1 = var_Items->InsertItem(h,vtMissing,long(16));
	var_Items->PutCellValue(h1,long(1),long(17));
	h1 = var_Items->InsertItem(h,vtMissing,long(2));
	var_Items->PutCellValue(h1,long(1),long(11));
	h1 = var_Items->InsertItem(h,vtMissing,long(2));
	var_Items->PutItemBackColor(h1,RGB(240,240,240));
	var_Items->PutCellValue(h1,long(1),long(9));
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	h = var_Items->InsertItem(vtMissing,vtMissing,"Group 2");
	var_Items->PutCellValueFormat(h,long(2),EXGRIDLib::exHTML);
	h1 = var_Items->InsertItem(h,vtMissing,long(16));
	var_Items->PutCellValue(h1,long(1),long(9));
	h1 = var_Items->InsertItem(h,vtMissing,long(12));
	var_Items->PutCellValue(h1,long(1),long(11));
	h1 = var_Items->InsertItem(h,vtMissing,long(2));
	var_Items->PutCellValue(h1,long(1),long(2));
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	var_Items->PutSelectItem(h,VARIANT_TRUE);
spGrid1->EndUpdate();

613
Is it possible to change the style for the vertical or horizontal grid lines, in the list area

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutDrawGridLines(EXGRIDLib::exAllLines);
spGrid1->PutGridLineStyle(EXGRIDLib::GridLinesStyleEnum(EXGRIDLib::exGridLinesVSolid | EXGRIDLib::exGridLinesHDot4));
spGrid1->GetColumns()->Add(L"C1");
spGrid1->GetColumns()->Add(L"C2");
spGrid1->GetColumns()->Add(L"C3");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("Item 1");
	var_Items->PutCellValue(h,long(1),"SubItem 1.2");
	var_Items->PutCellValue(h,long(2),"SubItem 1.3");
	h = var_Items->AddItem("Item 2");
	var_Items->PutCellValue(h,long(1),"SubItem 2.2");
	var_Items->PutCellValue(h,long(2),"SubItem 2.3");
spGrid1->EndUpdate();

612
Is it possible to change the style for the grid lines, for instance to be solid not dotted

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutDrawGridLines(EXGRIDLib::exAllLines);
spGrid1->PutGridLineStyle(EXGRIDLib::exGridLinesSolid);
spGrid1->GetColumns()->Add(L"Column");
spGrid1->EndUpdate();

611
I have some buttons added on the control's scroll bar, how can I can know when the button is being clicked

// ScrollButtonClick event - Occurs when the user clicks a button in the scrollbar.
void OnScrollButtonClickGrid1(long   ScrollBar,long   ScrollPart)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'
		#import <ExGrid.dll>
		using namespace EXGRIDLib;
	*/
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	OutputDebugStringW( L"ScrollBar" );
	OutputDebugStringW( L"ScrollPart" );
}

EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->PutScrollPartVisible(EXGRIDLib::exHScroll,EXGRIDLib::exLeftB1Part,VARIANT_TRUE);
spGrid1->PutScrollPartVisible(EXGRIDLib::exHScroll,EXGRIDLib::exLeftB2Part,VARIANT_TRUE);
spGrid1->PutScrollPartVisible(EXGRIDLib::exHScroll,EXGRIDLib::exRightB6Part,VARIANT_TRUE);
spGrid1->PutScrollPartVisible(EXGRIDLib::exHScroll,EXGRIDLib::exRightB5Part,VARIANT_TRUE);
spGrid1->PutScrollBars(EXGRIDLib::exDisableNoHorizontal);

610
How do I get notified once the user clicks a hyperlink created using the anchor HTML tag

// AnchorClick event - Occurs when an anchor element is clicked.
void OnAnchorClickGrid1(LPCTSTR   AnchorID,LPCTSTR   Options)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'
		#import <ExGrid.dll>
		using namespace EXGRIDLib;
	*/
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	OutputDebugStringW( L"AnchorID" );
	OutputDebugStringW( L"Options" );
}

EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Default")))->PutDef(EXGRIDLib::exCellValueFormat,long(1));
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->AddItem("This is a link: <aex.com;1>www.exontrol.com</a>");
	var_Items->AddItem("This is a link: <aex.net;2>www.exontrol.net</a>");

609
Is it possible to start editing a cell when double click it

// DblClick event - Occurs when the user dblclk the left mouse button over an object.
void OnDblClickGrid1(short   Shift,long   X,long   Y)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'
		#import <ExGrid.dll>
		using namespace EXGRIDLib;
	*/
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	spGrid1->Edit(vtMissing);
}

EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutAutoEdit(VARIANT_FALSE);
spGrid1->PutMarkSearchColumn(VARIANT_FALSE);
((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Edit1")))->GetEditor()->PutEditType(EXGRIDLib::EditType);
((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Edit2")))->GetEditor()->PutEditType(EXGRIDLib::EditType);
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->PutCellValue(var_Items->AddItem(long(1)),long(1),long(2));
EXGRIDLib::IItemsPtr var_Items1 = spGrid1->GetItems();
	var_Items1->PutCellValue(var_Items1->AddItem(long(3)),long(1),long(4));
spGrid1->EndUpdate();

608
Is it possible to disable standard single-click behavior for this column, so I manually could call Edit() when needed

// DblClick event - Occurs when the user dblclk the left mouse button over an object.
void OnDblClickGrid1(short   Shift,long   X,long   Y)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'
		#import <ExGrid.dll>
		using namespace EXGRIDLib;
	*/
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	spGrid1->Edit(vtMissing);
}

EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutAutoEdit(VARIANT_FALSE);
spGrid1->PutMarkSearchColumn(VARIANT_FALSE);
((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Edit1")))->GetEditor()->PutEditType(EXGRIDLib::EditType);
((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Edit2")))->GetEditor()->PutEditType(EXGRIDLib::EditType);
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->PutCellValue(var_Items->AddItem(long(1)),long(1),long(2));
EXGRIDLib::IItemsPtr var_Items1 = spGrid1->GetItems();
	var_Items1->PutCellValue(var_Items1->AddItem(long(3)),long(1),long(4));
spGrid1->EndUpdate();

607
How can I get or restore the old or previously value for the cell being changed
// Change event - Occurs when the user changes the cell's content.
void OnChangeGrid1(long   Item,long   ColIndex,VARIANT FAR*   NewValue)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'
		#import <ExGrid.dll>
		using namespace EXGRIDLib;
	*/
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	OutputDebugStringW( L"Old-Value:" );
	OutputDebugStringW( _bstr_t(spGrid1->GetItems()->GetCellValue(Item,ColIndex)) );
	OutputDebugStringW( L"New-Value:" );
	OutputDebugStringW( L"NewValue" );
}

EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutMarkSearchColumn(VARIANT_FALSE);
((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Edit1")))->GetEditor()->PutEditType(EXGRIDLib::EditType);
((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Edit2")))->GetEditor()->PutEditType(EXGRIDLib::EditType);
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->PutCellValue(var_Items->AddItem(long(1)),long(1),long(2));
EXGRIDLib::IItemsPtr var_Items1 = spGrid1->GetItems();
	var_Items1->PutCellValue(var_Items1->AddItem(long(3)),long(1),long(4));
spGrid1->EndUpdate();

606
How can I get the item from the cursor
// MouseMove event - Occurs when the user moves the mouse.
void OnMouseMoveGrid1(short   Button,short   Shift,long   X,long   Y)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'
		#import <ExGrid.dll>
		using namespace EXGRIDLib;
	*/
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	long h = spGrid1->GetItemFromPoint(-1,-1,c,hit);
	OutputDebugStringW( L"Handle" );
	OutputDebugStringW( L"h" );
	OutputDebugStringW( L"Index" );
	OutputDebugStringW( _bstr_t(spGrid1->GetItems()->GetItemToIndex(h)) );
}

EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot);
spGrid1->PutDrawGridLines(EXGRIDLib::exHLines);
spGrid1->GetColumns()->Add(L"Items");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("R1");
	var_Items->InsertItem(h,vtMissing,"Cell 1.1");
	var_Items->InsertItem(h,vtMissing,"Cell 1.2");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	h = var_Items->AddItem("R2");
	var_Items->InsertItem(h,vtMissing,"Cell 2.1");
	var_Items->InsertItem(h,vtMissing,"Cell 2.2");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
spGrid1->EndUpdate();

605
How can I get the column from the cursor, not only in the header

// MouseMove event - Occurs when the user moves the mouse.
void OnMouseMoveGrid1(short   Button,short   Shift,long   X,long   Y)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'
		#import <ExGrid.dll>
		using namespace EXGRIDLib;
	*/
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	OutputDebugStringW( _bstr_t(spGrid1->GetColumnFromPoint(-1,0)) );
}

EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot);
spGrid1->GetColumns()->Add(L"P1");
spGrid1->GetColumns()->Add(L"P2");
spGrid1->PutDrawGridLines(EXGRIDLib::exAllLines);
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("R1");
	var_Items->PutCellValue(h,long(1),"R2");
	var_Items->PutCellValue(var_Items->InsertItem(h,vtMissing,"Cell 1.1"),long(1),"Cell 1.2");
	var_Items->PutCellValue(var_Items->InsertItem(h,vtMissing,"Cell 2.1"),long(1),"Cell 2.2");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
spGrid1->EndUpdate();

604
How can I get the column from the cursor

// MouseMove event - Occurs when the user moves the mouse.
void OnMouseMoveGrid1(short   Button,short   Shift,long   X,long   Y)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'
		#import <ExGrid.dll>
		using namespace EXGRIDLib;
	*/
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	OutputDebugStringW( _bstr_t(spGrid1->GetColumnFromPoint(-1,-1)) );
}

EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot);
spGrid1->PutDrawGridLines(EXGRIDLib::exAllLines);
spGrid1->GetColumns()->Add(L"P1");
spGrid1->GetColumns()->Add(L"P2");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("R1");
	var_Items->PutCellValue(h,long(1),"R2");
	var_Items->PutCellValue(var_Items->InsertItem(h,vtMissing,"Cell 1.1"),long(1),"Cell 1.2");
	var_Items->PutCellValue(var_Items->InsertItem(h,vtMissing,"Cell 2.1"),long(1),"Cell 2.2");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
spGrid1->EndUpdate();

603
How can I get the cell's caption from the cursor
// MouseMove event - Occurs when the user moves the mouse.
void OnMouseMoveGrid1(short   Button,short   Shift,long   X,long   Y)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'
		#import <ExGrid.dll>
		using namespace EXGRIDLib;
	*/
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	long h = spGrid1->GetItemFromPoint(-1,-1,c,hit);
	OutputDebugStringW( spGrid1->GetItems()->GetCellCaption(h,c) );
}

EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot);
spGrid1->GetColumns()->Add(L"Items");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("R1");
	var_Items->InsertItem(h,vtMissing,"Cell 1.1");
	var_Items->InsertItem(h,vtMissing,"Cell 1.2");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	h = var_Items->AddItem("R2");
	var_Items->InsertItem(h,vtMissing,"Cell 2.1");
	var_Items->InsertItem(h,vtMissing,"Cell 2.2");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
spGrid1->EndUpdate();

602
How can I customize the items based on the values in the cells

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutMarkSearchColumn(VARIANT_FALSE);
EXGRIDLib::IConditionalFormatsPtr var_ConditionalFormats = spGrid1->GetConditionalFormats();
	EXGRIDLib::IConditionalFormatPtr var_ConditionalFormat = var_ConditionalFormats->Add(L"%1 >4",vtMissing);
		var_ConditionalFormat->PutBold(VARIANT_TRUE);
		var_ConditionalFormat->PutStrikeOut(VARIANT_TRUE);
		var_ConditionalFormat->PutForeColor(RGB(255,0,0));
		var_ConditionalFormat->PutApplyTo(EXGRIDLib::exFormatToItems);
	EXGRIDLib::IConditionalFormatPtr var_ConditionalFormat1 = var_ConditionalFormats->Add(L"%2 > 4",vtMissing);
		var_ConditionalFormat1->PutBold(VARIANT_TRUE);
		var_ConditionalFormat1->PutStrikeOut(VARIANT_TRUE);
		var_ConditionalFormat1->PutForeColor(RGB(255,0,0));
		var_ConditionalFormat1->PutApplyTo(EXGRIDLib::FormatApplyToEnum(0x2));
	EXGRIDLib::IConditionalFormatPtr var_ConditionalFormat2 = var_ConditionalFormats->Add(L"%3 > 4",vtMissing);
		var_ConditionalFormat2->PutBold(VARIANT_TRUE);
		var_ConditionalFormat2->PutStrikeOut(VARIANT_TRUE);
		var_ConditionalFormat2->PutForeColor(RGB(255,0,0));
		var_ConditionalFormat2->PutApplyTo(EXGRIDLib::FormatApplyToEnum(0x3));
EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns();
	var_Columns->Add(L"Name");
	EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"A")));
		var_Column->PutSortType(EXGRIDLib::SortNumeric);
		var_Column->PutAllowSizing(VARIANT_FALSE);
		var_Column->PutWidth(36);
		var_Column->PutFormatColumn(L"len(value) ? value + ' +'");
		var_Column->GetEditor()->PutEditType(EXGRIDLib::SpinType);
	EXGRIDLib::IColumnPtr var_Column1 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"B")));
		var_Column1->PutSortType(EXGRIDLib::SortNumeric);
		var_Column1->PutAllowSizing(VARIANT_FALSE);
		var_Column1->PutWidth(36);
		var_Column1->PutFormatColumn(L"len(value) ? value + ' +'");
		var_Column1->GetEditor()->PutEditType(EXGRIDLib::SpinType);
	EXGRIDLib::IColumnPtr var_Column2 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"C")));
		var_Column2->PutSortType(EXGRIDLib::SortNumeric);
		var_Column2->PutAllowSizing(VARIANT_FALSE);
		var_Column2->PutWidth(36);
		var_Column2->PutFormatColumn(L"len(value) ? value + ' ='");
		var_Column2->GetEditor()->PutEditType(EXGRIDLib::SpinType);
	EXGRIDLib::IColumnPtr var_Column3 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"A+B+C")));
		var_Column3->PutSortType(EXGRIDLib::SortNumeric);
		var_Column3->PutAllowSizing(VARIANT_FALSE);
		var_Column3->PutWidth(64);
		var_Column3->PutComputedField(L"%1+%2+%3");
		var_Column3->PutFormatColumn(L"((0:=dbl(value)) < 10? '<fgcolor=808080><font ;7>' :'<b>') + currency(=:0)");
		var_Column3->PutDef(EXGRIDLib::exCellValueFormat,long(1));
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("Root");
	var_Items->PutCellValueFormat(h,long(4),EXGRIDLib::exComputedField);
	long h1 = var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->PutCellValue(h1,long(1),long(7));
	var_Items->PutCellValue(h1,long(2),long(3));
	var_Items->PutCellValue(h1,long(3),long(1));
	h1 = var_Items->InsertItem(h,vtMissing,"Child 2");
	var_Items->PutCellValue(h1,long(1),long(2));
	var_Items->PutCellValue(h1,long(2),long(5));
	var_Items->PutCellValue(h1,long(3),long(12));
	h1 = var_Items->InsertItem(h,vtMissing,"Child 3");
	var_Items->PutCellValue(h1,long(1),long(2));
	var_Items->PutCellValue(h1,long(2),long(2));
	var_Items->PutCellValue(h1,long(3),long(4));
	h1 = var_Items->InsertItem(h,vtMissing,"Child 4");
	var_Items->PutCellValue(h1,long(1),long(2));
	var_Items->PutCellValue(h1,long(2),long(9));
	var_Items->PutCellValue(h1,long(3),long(4));
	var_Items->PutExpandItem(h,VARIANT_TRUE);
spGrid1->EndUpdate();

601
Is it is possible to have a column computing values from other columns

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutMarkSearchColumn(VARIANT_FALSE);
EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns();
	var_Columns->Add(L"Name");
	EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"A")));
		var_Column->PutSortType(EXGRIDLib::SortNumeric);
		var_Column->PutAllowSizing(VARIANT_FALSE);
		var_Column->PutWidth(36);
		var_Column->PutFormatColumn(L"len(value) ? value + ' +'");
		var_Column->GetEditor()->PutEditType(EXGRIDLib::SpinType);
	EXGRIDLib::IColumnPtr var_Column1 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"B")));
		var_Column1->PutSortType(EXGRIDLib::SortNumeric);
		var_Column1->PutAllowSizing(VARIANT_FALSE);
		var_Column1->PutWidth(36);
		var_Column1->PutFormatColumn(L"len(value) ? value + ' +'");
		var_Column1->GetEditor()->PutEditType(EXGRIDLib::SpinType);
	EXGRIDLib::IColumnPtr var_Column2 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"C")));
		var_Column2->PutSortType(EXGRIDLib::SortNumeric);
		var_Column2->PutAllowSizing(VARIANT_FALSE);
		var_Column2->PutWidth(36);
		var_Column2->PutFormatColumn(L"len(value) ? value + ' ='");
		var_Column2->GetEditor()->PutEditType(EXGRIDLib::SpinType);
	EXGRIDLib::IColumnPtr var_Column3 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"A+B+C")));
		var_Column3->PutSortType(EXGRIDLib::SortNumeric);
		var_Column3->PutAllowSizing(VARIANT_FALSE);
		var_Column3->PutWidth(64);
		var_Column3->PutComputedField(L"%1+%2+%3");
		var_Column3->PutFormatColumn(L"((0:=dbl(value)) < 10? '<fgcolor=808080><font ;7>' :'<b>') + currency(=:0)");
		var_Column3->PutDef(EXGRIDLib::exCellValueFormat,long(1));
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("Root");
	var_Items->PutCellValueFormat(h,long(4),EXGRIDLib::exComputedField);
	long h1 = var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->PutCellValue(h1,long(1),long(7));
	var_Items->PutCellValue(h1,long(2),long(3));
	var_Items->PutCellValue(h1,long(3),long(1));
	h1 = var_Items->InsertItem(h,vtMissing,"Child 2");
	var_Items->PutCellValue(h1,long(1),long(2));
	var_Items->PutCellValue(h1,long(2),long(5));
	var_Items->PutCellValue(h1,long(3),long(12));
	h1 = var_Items->InsertItem(h,vtMissing,"Child 3");
	var_Items->PutCellValue(h1,long(1),long(2));
	var_Items->PutCellValue(h1,long(2),long(2));
	var_Items->PutCellValue(h1,long(3),long(4));
	h1 = var_Items->InsertItem(h,vtMissing,"Child 4");
	var_Items->PutCellValue(h1,long(1),long(2));
	var_Items->PutCellValue(h1,long(2),long(9));
	var_Items->PutCellValue(h1,long(3),long(4));
	var_Items->PutExpandItem(h,VARIANT_TRUE);
spGrid1->EndUpdate();